Class MainGamepadListener

java.lang.Object
gaiasky.input.AbstractGamepadListener
gaiasky.input.MainGamepadListener
All Implemented Interfaces:
com.badlogic.gdx.controllers.ControllerListener, IObserver, IInputListener

public class MainGamepadListener extends AbstractGamepadListener
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
  • Constructor Details

  • Method Details

    • buttonDown

      public boolean buttonDown(com.badlogic.gdx.controllers.Controller controller, int buttonCode)
      Specified by:
      buttonDown in interface com.badlogic.gdx.controllers.ControllerListener
      Overrides:
      buttonDown in class AbstractGamepadListener
    • buttonUp

      public boolean buttonUp(com.badlogic.gdx.controllers.Controller controller, int buttonCode)
      Specified by:
      buttonUp in interface com.badlogic.gdx.controllers.ControllerListener
      Overrides:
      buttonUp in class AbstractGamepadListener
    • axisMoved

      public boolean axisMoved(com.badlogic.gdx.controllers.Controller controller, int axisCode, float value)
      Specified by:
      axisMoved in interface com.badlogic.gdx.controllers.ControllerListener
      Overrides:
      axisMoved in class AbstractGamepadListener
    • pollAxes

      public boolean pollAxes()
      Specified by:
      pollAxes in class AbstractGamepadListener
    • pollButtons

      public boolean pollButtons()
      Specified by:
      pollButtons in class AbstractGamepadListener