Interface GamepadInput

All Known Implementing Classes:
Gamepad

public interface GamepadInput
Provides input handling for gamepad devices.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    getAxis(int axis)
    Gets the current value of an axis.
    default float
    Gets the current value of an axis.
    boolean
    getButton(int button)
    Checks whether a button is being pressed.
    default boolean
    Checks whether a button is being pressed.
    boolean
    getButtonDown(int button)
     
    default boolean
     
  • Method Details

    • getAxis

      default float getAxis(GamepadAxis axis)
      Gets the current value of an axis.
      Returns:
      Value of the axis
    • getAxis

      float getAxis(int axis)
      Gets the current value of an axis.
      Parameters:
      axis - GLFW integer value for a gamepad axis
      Returns:
      Value of the axis
    • getButton

      default boolean getButton(GamepadButton button)
      Checks whether a button is being pressed.
      Returns:
      true if the button is being pressed
    • getButton

      boolean getButton(int button)
      Checks whether a button is being pressed.
      Parameters:
      button - GLFW integer value for a gamepad button
      Returns:
      true if the button is being pressed
    • getButtonDown

      default boolean getButtonDown(GamepadButton button)
    • getButtonDown

      boolean getButtonDown(int button)