Class TriggerEffect
java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.TriggerEffect
Allows clicking the affected text to trigger an event. You may want to use other markup with this, such as
underlining or especially a color change. Doesn't change over time. This is fully dependent on what the TypingLabel's
TypingListener/TypingAdapter does with the event by name.
Parameters:
The
Example usage:
Parameters:
event
The
event
is a normal String that will be passed to any registered
TypingListener
or TypingAdapter
when
this text is clicked. Defaults to "start".
Example usage:
{TRIGGER=party}When you click this, the party starts! If an event is registered for "party"...{ENDTRIGGER}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.tommyettinger.textra.Effect
Effect.EffectBuilder
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
onApply
(long glyph, int localIndex, int globalIndex, float delta) Called when this effect should be applied to the given glyph.Methods inherited from class com.github.tommyettinger.textra.Effect
apply, assignTokenName, calculateFadeout, calculateProgress, calculateProgress, calculateProgress, isFinished, paramAsBoolean, paramAsColor, paramAsFloat, update