public class XboxOneUiInput extends XboxOneControllerAdapter implements ControllerUiInput<XboxOneButton>
XboxOneController
implementation of ControllerUiInput
Constructor and Description |
---|
XboxOneUiInput(UiContainer uiContainer) |
Modifier and Type | Method and Description |
---|---|
boolean |
buttonDown(XboxOneController controller,
XboxOneButton button) |
boolean |
buttonUp(XboxOneController controller,
XboxOneButton button) |
void |
disable()
Disables this controller input for the
UiContainer |
void |
dispose()
Cleans up and de-registers this instance from the associated
UiContainer |
void |
enable()
Enables this controller input for the
UiContainer |
boolean |
equals(java.lang.Object obj) |
XboxOneButton |
getActionButton()
Returns the button used to trigger
Actionable instances |
java.lang.String |
getId()
Returns the unique id of this
ControllerUiInput |
int |
hashCode() |
boolean |
isEnabled()
Returns if the controller input is enabled for the
UiContainer |
boolean |
leftStickXMoved(XboxOneController controller,
float value) |
boolean |
leftStickYMoved(XboxOneController controller,
float value) |
void |
setActionButton(XboxOneButton 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
|
disconnected, leftTriggerMoved, rightStickXMoved, rightStickYMoved, rightTriggerMoved
public XboxOneUiInput(UiContainer uiContainer)
public void update(float delta)
ControllerUiInput
update
in interface ControllerUiInput<XboxOneButton>
delta
- The time since the last frame (in seconds)public boolean leftStickXMoved(XboxOneController controller, float value)
leftStickXMoved
in interface XboxOneControllerListener
leftStickXMoved
in class XboxOneControllerAdapter
public boolean leftStickYMoved(XboxOneController controller, float value)
leftStickYMoved
in interface XboxOneControllerListener
leftStickYMoved
in class XboxOneControllerAdapter
public boolean buttonDown(XboxOneController controller, XboxOneButton button)
buttonDown
in interface XboxOneControllerListener
buttonDown
in class XboxOneControllerAdapter
public boolean buttonUp(XboxOneController controller, XboxOneButton button)
buttonUp
in interface XboxOneControllerListener
buttonUp
in class XboxOneControllerAdapter
public boolean isEnabled()
ControllerUiInput
UiContainer
isEnabled
in interface ControllerUiInput<XboxOneButton>
public void enable()
ControllerUiInput
UiContainer
enable
in interface ControllerUiInput<XboxOneButton>
public void disable()
ControllerUiInput
UiContainer
disable
in interface ControllerUiInput<XboxOneButton>
public void setStickRepeatTimer(float stickRepeatTimer)
stickRepeatTimer
- Default value is 0.25 secondspublic void setStickThreshold(float stickThreshold)
stickThreshold
- Default value is 0.25public XboxOneButton getActionButton()
ControllerUiInput
Actionable
instancesgetActionButton
in interface ControllerUiInput<XboxOneButton>
public void setActionButton(XboxOneButton actionButton)
ControllerUiInput
Actionable
instancessetActionButton
in interface ControllerUiInput<XboxOneButton>
public void dispose()
ControllerUiInput
UiContainer
dispose
in interface ControllerUiInput<XboxOneButton>
public java.lang.String getId()
ControllerUiInput
ControllerUiInput
getId
in interface ControllerUiInput<XboxOneButton>
String
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object