Package gaiasky.input

Class GuiGamepadListener

All Implemented Interfaces:
com.badlogic.gdx.controllers.ControllerListener, IObserver, IInputListener
Direct Known Subclasses:
WindowGamepadListener

public abstract class GuiGamepadListener extends AbstractGamepadListener
A gamepad listener for GUI elements like windows and panes.
  • Field Details

    • stage

      protected final com.badlogic.gdx.scenes.scene2d.Stage stage
  • Constructor Details

    • GuiGamepadListener

      public GuiGamepadListener(String mappingsFile, com.badlogic.gdx.scenes.scene2d.Stage stage)
    • GuiGamepadListener

      public GuiGamepadListener(IGamepadMappings mappings, com.badlogic.gdx.scenes.scene2d.Stage stage)
  • 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
    • 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
    • getContentContainers

      public com.badlogic.gdx.utils.Array<com.badlogic.gdx.scenes.scene2d.Group> getContentContainers()
    • actionDown

      public void actionDown()
      By default, the main action acts on the keyboard focus actor by firing a change event or checking it, if it is a checkbox.
    • back

      public abstract void back()
    • start

      public abstract void start()
    • select

      public abstract void select()
    • tabLeft

      public abstract void tabLeft()
    • tabRight

      public abstract void tabRight()
    • moveLeft

      public abstract void moveLeft()
    • moveRight

      public abstract void moveRight()
    • moveUp

      public void moveUp()
      Moves the focus up.
    • moveDown

      public void moveDown()
      Moves the focus down.
    • moveFocusVertical

      public void moveFocusVertical(boolean up)
    • rightStickVertical

      public void rightStickVertical(float value)
      By default, the vertical right stick does:
      • Change the selection in select boxes.
      • Move the first scroll pane found in the content up and down.
      Parameters:
      value - The axis value.
    • rightStickVertical

      protected void rightStickVertical(com.badlogic.gdx.scenes.scene2d.Actor focus, float value)
    • rightStickHorizontal

      public void rightStickHorizontal(float value)
      By default, the horizontal right stick does:
      • Move sliders right and left.
      Parameters:
      value - The axis value.
    • rightStickHorizontal

      protected void rightStickHorizontal(com.badlogic.gdx.scenes.scene2d.Actor focus, float value)