public abstract class Modal extends Container implements Navigatable
Container
implementation that can be navigated by player input and
supports hotkeysasyncAddQueue, asyncRemoveAll, asyncRemoveQueue, children, renderNode
deferredQueue, effects, styleId, visibility, zIndex
Modifier and Type | Method and Description |
---|---|
void |
clearControllerHotkeys()
Unmaps all controller hotkeys
|
void |
clearHotkeys()
Unmaps all hotkeys
|
void |
clearKeyboardHotkeys()
Unmaps all keyboard hotkeys
|
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 |
setNavigation(UiNavigation navigation) |
void |
syncWithRenderNode()
Syncs data between the
UiElement and RenderNode |
void |
unsetHotkey(ControllerButton button)
Unmaps a
ControllerButton hotkey |
void |
unsetHotkey(int keycode)
Unmaps a keyboard hotkey
|
createRenderNode, withElements, withElements
add, add, addAsync, attach, defer, detach, getElementById, getFlexDirection, getLayout, getTotalChildren, remove, remove, removeAll, removeAllAsync, removeAsync, setFlexDirection, setLayout, setStyleId, setVisibility, setZIndex
addEffectListener, addHoverListener, applyEffect, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabled
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getId
public void syncWithRenderNode()
UiElement
UiElement
and RenderNode
syncWithRenderNode
in class ParentUiElement
public ActionableRenderNode navigate(int keycode)
Navigatable
ActionableRenderNode
navigate
in interface Navigatable
keycode
- The navigation Input.Keys
valueUiNavigation
is availablepublic ActionableRenderNode hotkey(int keycode)
Navigatable
ActionableRenderNode
mapped to a keyboard hotkeyhotkey
in interface Navigatable
keycode
- The Input.Keys
keycode that is the hotkeypublic ActionableRenderNode hotkey(ControllerButton button)
Navigatable
ActionableRenderNode
mapped to a ControllerButton
hotkeyhotkey
in interface Navigatable
button
- The ControllerButton
that is the hotkeypublic void setHotkey(ControllerButton button, Actionable actionable)
Navigatable
ControllerButton
to a Actionable
setHotkey
in interface Navigatable
button
- The ControllerButton
that is the hotkeyactionable
- The Actionable
to trigger when the hotkey is pressedpublic void setHotkey(int keycode, Actionable actionable)
Navigatable
Actionable
setHotkey
in interface Navigatable
keycode
- The Input.Keys
keycode that is the hotkeyactionable
- The Actionable
to trigger when the key is pressedpublic void unsetHotkey(ControllerButton button)
Navigatable
ControllerButton
hotkeyunsetHotkey
in interface Navigatable
button
- The ControllerButton
that is the hotkeypublic void unsetHotkey(int keycode)
Navigatable
unsetHotkey
in interface Navigatable
keycode
- The Input.Keys
keycode that is the hotkeypublic void clearControllerHotkeys()
Navigatable
clearControllerHotkeys
in interface Navigatable
public void clearKeyboardHotkeys()
Navigatable
clearKeyboardHotkeys
in interface Navigatable
public void clearHotkeys()
Navigatable
clearHotkeys
in interface Navigatable
public UiNavigation getNavigation()
Navigatable
UiNavigation
currently being navigatedgetNavigation
in interface Navigatable
public void setNavigation(UiNavigation navigation)