Package org.polyfrost.polyui.event
Class EventDSL
-
-
Method Summary
Modifier and Type Method Description final <E extends Event> Unitto(E $self, Function2<S, E, Boolean> handler)specify a handler for this event. final <E extends Event> UnitTo(E $self, Function2<S, E, Unit> handler)specify a handler for this event. final <E extends Event> Unitthen(E $self, Function2<S, E, Boolean> handler)specify a handler for this event. final <E extends Event> UnitThen(E $self, Function2<S, E, Unit> handler)specify a handler for this event. -
-
Constructor Detail
-
EventDSL
EventDSL(S self)
-
-
Method Detail
-
to
final <E extends Event> Unit to(E $self, Function2<S, E, Boolean> handler)
specify a handler for this event.
in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.
Return true to consume the event. True by default.
- Since:
0.19.2
-
To
final <E extends Event> Unit To(E $self, Function2<S, E, Unit> handler)
specify a handler for this event.
in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.
Return true to consume the event. True by default.
- Since:
0.19.2
-
then
final <E extends Event> Unit then(E $self, Function2<S, E, Boolean> handler)
specify a handler for this event.
in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.
Return true to consume the event. True by default.
- Since:
0.19.2
-
-
-
-