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