public class Xbox360ControllerAdapter extends java.lang.Object implements Xbox360ControllerListener
Xbox360ControllerListener
Constructor and Description |
---|
Xbox360ControllerAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
buttonDown(Xbox360Controller controller,
Xbox360Button button)
Called when a button is pressed down
|
boolean |
buttonUp(Xbox360Controller controller,
Xbox360Button button)
Called when a button is released
|
void |
disconnected(Xbox360Controller controller)
Called when a controller disconnects
|
boolean |
leftStickXMoved(Xbox360Controller controller,
float value)
Called when left stick moves along its X axis
|
boolean |
leftStickYMoved(Xbox360Controller controller,
float value)
Called when left stick moves along its Y axis
|
boolean |
leftTriggerMoved(Xbox360Controller controller,
float value)
Called when the left trigger is moved
|
boolean |
rightStickXMoved(Xbox360Controller controller,
float value)
Called when right stick moves along its X axis
|
boolean |
rightStickYMoved(Xbox360Controller controller,
float value)
Called when left stick moves along its Y axis
|
boolean |
rightTriggerMoved(Xbox360Controller controller,
float value)
Called when the right trigger is moved
|
public void disconnected(Xbox360Controller controller)
Xbox360ControllerListener
disconnected
in interface Xbox360ControllerListener
controller
- The controller that this event came frompublic boolean buttonDown(Xbox360Controller controller, Xbox360Button button)
Xbox360ControllerListener
buttonDown
in interface Xbox360ControllerListener
controller
- The controller that this event came frombutton
- The button that was pressedpublic boolean buttonUp(Xbox360Controller controller, Xbox360Button button)
Xbox360ControllerListener
buttonUp
in interface Xbox360ControllerListener
controller
- The controller that this event came frombutton
- The button that was releasedpublic boolean leftTriggerMoved(Xbox360Controller controller, float value)
Xbox360ControllerListener
leftTriggerMoved
in interface Xbox360ControllerListener
controller
- The controller that this event came fromvalue
- ~0f when released, ~1f when pressedpublic boolean rightTriggerMoved(Xbox360Controller controller, float value)
Xbox360ControllerListener
rightTriggerMoved
in interface Xbox360ControllerListener
controller
- The controller that this event came fromvalue
- ~0f when released, ~1f when pressedpublic boolean leftStickXMoved(Xbox360Controller controller, float value)
Xbox360ControllerListener
leftStickXMoved
in interface Xbox360ControllerListener
controller
- The controller 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
controller instance to correct this)public boolean leftStickYMoved(Xbox360Controller controller, float value)
Xbox360ControllerListener
leftStickYMoved
in interface Xbox360ControllerListener
controller
- The controller 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
controller instance to correct this)public boolean rightStickXMoved(Xbox360Controller controller, float value)
Xbox360ControllerListener
rightStickXMoved
in interface Xbox360ControllerListener
controller
- The controller 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
controller instance to correct this)public boolean rightStickYMoved(Xbox360Controller controller, float value)
Xbox360ControllerListener
rightStickYMoved
in interface Xbox360ControllerListener
controller
- The controller 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
controller instance to correct this)