Class MainGamepadListener
java.lang.Object
gaiasky.input.AbstractGamepadListener
gaiasky.input.MainGamepadListener
- All Implemented Interfaces:
com.badlogic.gdx.controllers.ControllerListener, IObserver, IInputListener
Implements the gamepad/game controller listener in default mode.
The default mappings go like this:
- X - visibility of labels
- Y - visibility of orbits
- A - hold to speed up camera
- B - visibility of asteroids
- D-pad right - start time
- D-pad left - stop time
- Start - show preferences (gamepad menu)
- Select - show quit window
- RB - move vertically up
- LB - move vertically down
- Axis R - movement
- Axis L - rotate view (free mode), rotate around object (focus mode)
- ZR - roll right
- ZL - roll left
-
Field Summary
Fields inherited from class AbstractGamepadListener
active, axisEventDelay, axisPollDelay, buttonPollDelay, em, lastAxisEvtTime, lastButtonPollTime, lastControllerUsed, mappings, MIN_ZERO_POINT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaxisMoved(com.badlogic.gdx.controllers.Controller controller, int axisCode, float value) booleanbuttonDown(com.badlogic.gdx.controllers.Controller controller, int buttonCode) booleanbuttonUp(com.badlogic.gdx.controllers.Controller controller, int buttonCode) booleanpollAxes()booleanMethods inherited from class AbstractGamepadListener
activate, anyPressed, anyPressed, applyZeroPoint, connected, deactivate, disconnected, getMappings, isActive, isKeyPressed, isKeyPressed, notify, setMappings, update
-
Constructor Details
-
MainGamepadListener
-
-
Method Details
-
buttonDown
public boolean buttonDown(com.badlogic.gdx.controllers.Controller controller, int buttonCode) - Specified by:
buttonDownin interfacecom.badlogic.gdx.controllers.ControllerListener- Overrides:
buttonDownin classAbstractGamepadListener
-
buttonUp
public boolean buttonUp(com.badlogic.gdx.controllers.Controller controller, int buttonCode) - Specified by:
buttonUpin interfacecom.badlogic.gdx.controllers.ControllerListener- Overrides:
buttonUpin classAbstractGamepadListener
-
axisMoved
public boolean axisMoved(com.badlogic.gdx.controllers.Controller controller, int axisCode, float value) - Specified by:
axisMovedin interfacecom.badlogic.gdx.controllers.ControllerListener- Overrides:
axisMovedin classAbstractGamepadListener
-
pollAxes
public boolean pollAxes()- Specified by:
pollAxesin classAbstractGamepadListener
-
pollButtons
public boolean pollButtons()- Specified by:
pollButtonsin classAbstractGamepadListener
-