public interface Navigatable
UiElement
s that can be navigated by keyboard or
controllerModifier and Type | Method and Description |
---|---|
void |
clearControllerHotkeys()
Unmaps all controller hotkeys
|
void |
clearHotkeys()
Unmaps all hotkeys
|
void |
clearKeyboardHotkeys()
Unmaps all keyboard hotkeys
|
java.lang.String |
getId()
Returns the unique id of the
Navigatable |
UiNavigation |
getNavigation()
Returns the
UiNavigation currently being navigated |
ActionableRenderNode |
hotkey(ControllerButton button)
Returns the corresponding
ActionableRenderNode mapped to a ControllerButton hotkey |
ActionableRenderNode |
hotkey(int keycode)
Returns the corresponding
ActionableRenderNode mapped to a keyboard hotkey |
ActionableRenderNode |
navigate(int keycode)
Triggers a navigation and returns the newly highlighted
ActionableRenderNode |
void |
setHotkey(ControllerButton button,
Actionable actionable)
Maps a
ControllerButton to a Actionable |
void |
setHotkey(int keycode,
Actionable actionable)
Maps a keyboard button to a
Actionable |
void |
unsetHotkey(ControllerButton button)
Unmaps a
ControllerButton hotkey |
void |
unsetHotkey(int keycode)
Unmaps a keyboard hotkey
|
java.lang.String getId()
Navigatable
String
that is the idActionableRenderNode navigate(int keycode)
ActionableRenderNode
keycode
- The navigation Input.Keys
valueUiNavigation
is availableActionableRenderNode hotkey(int keycode)
ActionableRenderNode
mapped to a keyboard hotkeykeycode
- The Input.Keys
keycode that is the hotkeyActionableRenderNode hotkey(ControllerButton button)
ActionableRenderNode
mapped to a ControllerButton
hotkeybutton
- The ControllerButton
that is the hotkeyvoid setHotkey(ControllerButton button, Actionable actionable)
ControllerButton
to a Actionable
button
- The ControllerButton
that is the hotkeyactionable
- The Actionable
to trigger when the hotkey is pressedvoid setHotkey(int keycode, Actionable actionable)
Actionable
keycode
- The Input.Keys
keycode that is the hotkeyactionable
- The Actionable
to trigger when the key is pressedvoid unsetHotkey(ControllerButton button)
ControllerButton
hotkeybutton
- The ControllerButton
that is the hotkeyvoid unsetHotkey(int keycode)
keycode
- The Input.Keys
keycode that is the hotkeyvoid clearHotkeys()
void clearControllerHotkeys()
void clearKeyboardHotkeys()
UiNavigation getNavigation()
UiNavigation
currently being navigated