Package org.polyfrost.polyui.dsl
Class EventDSL
-
- All Implemented Interfaces:
@JvmInline() public final class EventDSL<S extends Inputtable>
DSL for events.
- Since:
0.23.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceEventDSL.Markermarker class for preventing illegal nesting.
-
Method Summary
Modifier and Type Method Description final SgetSelf()final <E extends Event> <Error class: unknown class>then(E $self, Function2<S, E, Boolean> handler)specify a handler for this event. final <E extends Event> <Error class: unknown class>to(E $self, Function2<S, E, Unit> handler)specify a handler for this event. -
-
Constructor Detail
-
EventDSL
EventDSL(S self)
-
-
Method Detail
-
then
final <E extends Event> <Error class: unknown class> 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 recoloring and rotating
Return true to consume the event. True by default.
- Since:
0.19.2
-
-
-
-