Interface GamepadInput
- All Known Implementing Classes:
Gamepad
public interface GamepadInput
Provides input handling for gamepad devices.
-
Method Summary
Modifier and TypeMethodDescriptionfloatgetAxis(int axis) Gets the current value of an axis.default floatgetAxis(GamepadAxis axis) Gets the current value of an axis.booleangetButton(int button) Checks whether a button is being pressed.default booleangetButton(GamepadButton button) Checks whether a button is being pressed.booleangetButtonDown(int button) default booleangetButtonDown(GamepadButton button)
-
Method Details
-
getAxis
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
Checks whether a button is being pressed.- Returns:
trueif 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:
trueif the button is being pressed
-
getButtonDown
-
getButtonDown
boolean getButtonDown(int button)
-