Class AttentionEffect

java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.AttentionEffect

public class AttentionEffect extends Effect
Makes the hovered-over glyph stretch on y, as well as some glyphs near it. Doesn't change over time, but does change with pointer movement.
Parameters: spread;stretchY
The spread is a percentage from 0% to potentially much higher than 100%; it defaults to 500%. The stretchY is a percentage from 0% (shrink to nothing) to 100% (no change) to higher, such as 200% to double the height of affected glyphs.
Example usage: {ATTENTION=1000;50}Roughly 10 glyphs in either direction will get squashed to a shorter height on mouse-over.{ENDATTENTION} {ATTENTION=300;200}Roughly 3 glyphs in either direction will stretch to approach double-height on mouse-over.{ENDATTENTION}
  • Constructor Details

  • Method Details

    • onApply

      protected void onApply(long glyph, int localIndex, int globalIndex, float delta)
      Description copied from class: Effect
      Called when this effect should be applied to the given glyph.
      Specified by:
      onApply in class Effect