Package org.polyfrost.polyui.component
Interface Focusable
-
- All Implemented Interfaces:
public interface Focusableimplement this in order to receive focus event, such as key presses
-
-
Method Summary
Modifier and Type Method Description abstract Booleanaccept(FocusedEvent event)Accept a FocusedEvent and handle it. Unitaccept(Integer key, Boolean down)Accept a non-mapped key press. -
-
Method Detail
-
accept
abstract Boolean accept(FocusedEvent event)
Accept a FocusedEvent and handle it.
-
accept
Unit accept(Integer key, Boolean down)
Accept a non-mapped key press. This is called when any key is pressed that is not a mapped key.
This method should not really be used in normal usage, as it is effectively platform-dependent. It is provided for usage where you need to use a key that is not mapped by PolyUI, such as keybindings.
See PolyUI.getKeyName to get the name of the key.
-
-
-
-