public class SwitchJoyConLUiInput extends SwitchJoyConLGamePadAdapter implements GamePadUiInput<SwitchJoyConLButton>
| Constructor and Description |
|---|
SwitchJoyConLUiInput(UiContainer uiContainer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
buttonDown(SwitchJoyConLGamePad controller,
SwitchJoyConLButton button) |
boolean |
buttonUp(SwitchJoyConLGamePad controller,
SwitchJoyConLButton 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) |
SwitchJoyConLButton |
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 |
leftStickXMoved(SwitchJoyConLGamePad controller,
float value) |
boolean |
leftStickYMoved(SwitchJoyConLGamePad controller,
float value) |
void |
setActionButton(SwitchJoyConLButton actionButton)
Sets the button used for triggering
Actionable instances |
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, zlMovedpublic SwitchJoyConLUiInput(UiContainer uiContainer)
public void update(float delta)
GamePadUiInputupdate in interface GamePadUiInput<SwitchJoyConLButton>delta - The time since the last frame (in seconds)public boolean leftStickXMoved(SwitchJoyConLGamePad controller, float value)
leftStickXMoved in interface SwitchJoyConLGamePadListenerleftStickXMoved in class SwitchJoyConLGamePadAdapterpublic boolean leftStickYMoved(SwitchJoyConLGamePad controller, float value)
leftStickYMoved in interface SwitchJoyConLGamePadListenerleftStickYMoved in class SwitchJoyConLGamePadAdapterpublic boolean buttonDown(SwitchJoyConLGamePad controller, SwitchJoyConLButton button)
buttonDown in interface SwitchJoyConLGamePadListenerbuttonDown in class SwitchJoyConLGamePadAdapterpublic boolean buttonUp(SwitchJoyConLGamePad controller, SwitchJoyConLButton button)
buttonUp in interface SwitchJoyConLGamePadListenerbuttonUp in class SwitchJoyConLGamePadAdapterpublic boolean isEnabled()
GamePadUiInputUiContainerisEnabled in interface GamePadUiInput<SwitchJoyConLButton>public void enable()
GamePadUiInputUiContainerenable in interface GamePadUiInput<SwitchJoyConLButton>public void disable()
GamePadUiInputUiContainerdisable in interface GamePadUiInput<SwitchJoyConLButton>public void setStickRepeatTimer(float stickRepeatTimer)
stickRepeatTimer - Default value is 0.25 secondspublic void setStickThreshold(float stickThreshold)
stickThreshold - Default value is 0.25public SwitchJoyConLButton getActionButton()
GamePadUiInputActionable instancesgetActionButton in interface GamePadUiInput<SwitchJoyConLButton>public void setActionButton(SwitchJoyConLButton actionButton)
GamePadUiInputActionable instancessetActionButton in interface GamePadUiInput<SwitchJoyConLButton>public void dispose()
GamePadUiInputUiContainerdispose in interface GamePadUiInput<SwitchJoyConLButton>public java.lang.String getId()
GamePadUiInputGamePadUiInputgetId in interface GamePadUiInput<SwitchJoyConLButton>Stringpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object