public class XboxGamePadAdapter extends java.lang.Object implements XboxGamePadListener
| Constructor and Description |
|---|
XboxGamePadAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
buttonDown(XboxGamePad gamePad,
XboxButton button)
Called when a button is pressed down
|
boolean |
buttonUp(XboxGamePad gamePad,
XboxButton button)
Called when a button is released
|
void |
connected(XboxGamePad gamePad)
Called when a gamepad connects
|
void |
disconnected(XboxGamePad gamePad)
Called when a gamepad disconnects
|
boolean |
leftStickXMoved(XboxGamePad gamePad,
float value)
Called when left stick moves along its X axis
|
boolean |
leftStickYMoved(XboxGamePad gamePad,
float value)
Called when left stick moves along its Y axis
|
boolean |
leftTriggerMoved(XboxGamePad gamePad,
float value)
Called when the left trigger is moved
|
boolean |
rightStickXMoved(XboxGamePad gamePad,
float value)
Called when right stick moves along its X axis
|
boolean |
rightStickYMoved(XboxGamePad gamePad,
float value)
Called when left stick moves along its Y axis
|
boolean |
rightTriggerMoved(XboxGamePad gamePad,
float value)
Called when the right trigger is moved
|
public void connected(XboxGamePad gamePad)
XboxGamePadListenerconnected in interface XboxGamePadListenergamePad - The gamepad that this event came frompublic void disconnected(XboxGamePad gamePad)
XboxGamePadListenerdisconnected in interface XboxGamePadListenergamePad - The gamepad that this event came frompublic boolean buttonDown(XboxGamePad gamePad, XboxButton button)
XboxGamePadListenerbuttonDown in interface XboxGamePadListenergamePad - The gamePad that this event came frombutton - The button that was pressedpublic boolean buttonUp(XboxGamePad gamePad, XboxButton button)
XboxGamePadListenerbuttonUp in interface XboxGamePadListenergamePad - The gamepad that this event came frombutton - The button that was releasedpublic boolean leftTriggerMoved(XboxGamePad gamePad, float value)
XboxGamePadListenerleftTriggerMoved in interface XboxGamePadListenergamePad - The gamepad that this event came fromvalue - ~0f when released, ~1f when pressedpublic boolean rightTriggerMoved(XboxGamePad gamePad, float value)
XboxGamePadListenerrightTriggerMoved in interface XboxGamePadListenergamePad - The gamepad that this event came fromvalue - ~0f when released, ~1f when pressedpublic boolean leftStickXMoved(XboxGamePad gamePad, float value)
XboxGamePadListenerleftStickXMoved in interface XboxGamePadListenergamePad - The gamepad that this event came fromvalue - ~-1f at left, ~0f at center, ~1f at right (values may never be
accurate due to dead zones, apply a DeadZone to the
gamepad instance to correct this)public boolean leftStickYMoved(XboxGamePad gamePad, float value)
XboxGamePadListenerleftStickYMoved in interface XboxGamePadListenergamePad - The gamepad that this event came fromvalue - ~-1f at top, ~0f at center, ~1f at bottom (values may never be
accurate due to dead zones, apply a DeadZone to the
gamepad instance to correct this)public boolean rightStickXMoved(XboxGamePad gamePad, float value)
XboxGamePadListenerrightStickXMoved in interface XboxGamePadListenergamePad - The gamepad that this event came fromvalue - ~-1f at left, ~0f at center, ~1f at right (values may never be
accurate due to dead zones, apply a DeadZone to the
gamepad instance to correct this)public boolean rightStickYMoved(XboxGamePad gamePad, float value)
XboxGamePadListenerrightStickYMoved in interface XboxGamePadListenergamePad - The gamepad that this event came fromvalue - ~-1f at top, ~0f at center, ~1f at bottom (values may never be
accurate due to dead zones, apply a DeadZone to the
gamepad instance to correct this)