public class SwitchJoyConRUiInput extends SwitchJoyConRGamePadAdapter implements GamePadUiInput<SwitchJoyConRButton>
| Constructor and Description |
|---|
SwitchJoyConRUiInput(UiContainer uiContainer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
buttonDown(SwitchJoyConRGamePad controller,
SwitchJoyConRButton button) |
boolean |
buttonUp(SwitchJoyConRGamePad controller,
SwitchJoyConRButton button) |
void |
disable()
Disables this gamepad input for the
UiContainer |
void |
dispose()
Cleans up and de-registers this instance from the associated
UiContainer |
void |
enable()
Enables this gamepad input for the
UiContainer |
boolean |
equals(java.lang.Object obj) |
SwitchJoyConRButton |
getActionButton()
Returns the button used to trigger
Actionable instances |
java.lang.String |
getId()
Returns the unique id of this
GamePadUiInput |
int |
hashCode() |
boolean |
isEnabled()
Returns if the gamepad input is enabled for the
UiContainer |
boolean |
isNavigateWithDPad()
Returns if
UiNavigation events should be triggered by the D-PAD |
boolean |
rightStickXMoved(SwitchJoyConRGamePad controller,
float value) |
boolean |
rightStickYMoved(SwitchJoyConRGamePad controller,
float value) |
void |
setActionButton(SwitchJoyConRButton actionButton)
Sets the button used for triggering
Actionable instances |
void |
setNavigateWithDPad(boolean navigateWithDPad)
Sets if
UiNavigation events should be triggered by the D-PAD |
void |
setStickRepeatTimer(float stickRepeatTimer)
Sets the amount of time in seconds before the left stick is considered repeating a navigation direction
|
void |
setStickThreshold(float stickThreshold)
Sets the threshold for stick values before the input is considered as a navigation direction press
|
void |
update(float delta)
Updates the input for repeating presses
|
connected, disconnected, zrMovedpublic SwitchJoyConRUiInput(UiContainer uiContainer)
public void update(float delta)
GamePadUiInputupdate in interface GamePadUiInput<SwitchJoyConRButton>delta - The time since the last frame (in seconds)public boolean rightStickXMoved(SwitchJoyConRGamePad controller, float value)
rightStickXMoved in interface SwitchJoyConRGamePadListenerrightStickXMoved in class SwitchJoyConRGamePadAdapterpublic boolean rightStickYMoved(SwitchJoyConRGamePad controller, float value)
rightStickYMoved in interface SwitchJoyConRGamePadListenerrightStickYMoved in class SwitchJoyConRGamePadAdapterpublic boolean buttonDown(SwitchJoyConRGamePad controller, SwitchJoyConRButton button)
buttonDown in interface SwitchJoyConRGamePadListenerbuttonDown in class SwitchJoyConRGamePadAdapterpublic boolean buttonUp(SwitchJoyConRGamePad controller, SwitchJoyConRButton button)
buttonUp in interface SwitchJoyConRGamePadListenerbuttonUp in class SwitchJoyConRGamePadAdapterpublic boolean isEnabled()
GamePadUiInputUiContainerisEnabled in interface GamePadUiInput<SwitchJoyConRButton>public void enable()
GamePadUiInputUiContainerenable in interface GamePadUiInput<SwitchJoyConRButton>public void disable()
GamePadUiInputUiContainerdisable in interface GamePadUiInput<SwitchJoyConRButton>public void setStickRepeatTimer(float stickRepeatTimer)
stickRepeatTimer - Default value is 0.25 secondspublic void setStickThreshold(float stickThreshold)
stickThreshold - Default value is 0.25public boolean isNavigateWithDPad()
UiNavigation events should be triggered by the D-PADpublic void setNavigateWithDPad(boolean navigateWithDPad)
UiNavigation events should be triggered by the D-PADnavigateWithDPad - True if events should be triggeredpublic SwitchJoyConRButton getActionButton()
GamePadUiInputActionable instancesgetActionButton in interface GamePadUiInput<SwitchJoyConRButton>public void setActionButton(SwitchJoyConRButton actionButton)
GamePadUiInputActionable instancessetActionButton in interface GamePadUiInput<SwitchJoyConRButton>public void dispose()
GamePadUiInputUiContainerdispose in interface GamePadUiInput<SwitchJoyConRButton>public java.lang.String getId()
GamePadUiInputGamePadUiInputgetId in interface GamePadUiInput<SwitchJoyConRButton>Stringpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object