struct Espresso::GamepadState
- Espresso::GamepadState
- Struct
- Value
- Object
Overview
Describes the input state of a gamepad.
The #guide
button may not be available for input
as it is often hooked by the system or the Steam client.
Not all devices have all the buttons or axes defined by this type.
Unavailable buttons and axes will always report ButtonState::Released
and 0.0 respectively.
Defined in:
espresso/input/joystick/gamepad_state.crInstance Method Summary
-
#a : GamepadState
Gets the state of the button.
-
#a?
Indicates whether the button is currently pressed.
-
#axes : Indexable(Float)
The states of each gamepad axis, in the range -1.0 to 1.0 inclusive.
-
#b : GamepadState
Gets the state of the button.
-
#b?
Indicates whether the button is currently pressed.
-
#back : GamepadState
Gets the state of the button.
-
#back?
Indicates whether the button is currently pressed.
-
#buttons : Indexable(ButtonState)
The states of each gamepad button,
ButtonState::Pressed
orButtonState::Released
. -
#circle : GamepadState
Gets the state of the button.
-
#circle?
Indicates whether the button is currently pressed.
-
#cross : GamepadState
Gets the state of the button.
-
#cross?
Indicates whether the button is currently pressed.
-
#dpad_down : GamepadState
Gets the state of the button.
-
#dpad_down?
Indicates whether the button is currently pressed.
-
#dpad_left : GamepadState
Gets the state of the button.
-
#dpad_left?
Indicates whether the button is currently pressed.
-
#dpad_right : GamepadState
Gets the state of the button.
-
#dpad_right?
Indicates whether the button is currently pressed.
-
#dpad_up : GamepadState
Gets the state of the button.
-
#dpad_up?
Indicates whether the button is currently pressed.
-
#guide : GamepadState
Gets the state of the button.
-
#guide?
Indicates whether the button is currently pressed.
-
#left_bumper : GamepadState
Gets the state of the button.
-
#left_bumper?
Indicates whether the button is currently pressed.
-
#left_thumb : GamepadState
Gets the state of the button.
-
#left_thumb?
Indicates whether the button is currently pressed.
-
#left_trigger : GamepadAxis
Gets the state of the axis, in the range -1.0 to 1.0 inclusive.
-
#left_x : GamepadAxis
Gets the state of the axis, in the range -1.0 to 1.0 inclusive.
-
#left_y : GamepadAxis
Gets the state of the axis, in the range -1.0 to 1.0 inclusive.
-
#right_bumper : GamepadState
Gets the state of the button.
-
#right_bumper?
Indicates whether the button is currently pressed.
-
#right_thumb : GamepadState
Gets the state of the button.
-
#right_thumb?
Indicates whether the button is currently pressed.
-
#right_trigger : GamepadAxis
Gets the state of the axis, in the range -1.0 to 1.0 inclusive.
-
#right_x : GamepadAxis
Gets the state of the axis, in the range -1.0 to 1.0 inclusive.
-
#right_y : GamepadAxis
Gets the state of the axis, in the range -1.0 to 1.0 inclusive.
-
#square : GamepadState
Gets the state of the button.
-
#square?
Indicates whether the button is currently pressed.
-
#start : GamepadState
Gets the state of the button.
-
#start?
Indicates whether the button is currently pressed.
-
#to_unsafe : LibGLFW::GamepadState
Returns the underlying GLFW gamepad state structure.
-
#triangle : GamepadState
Gets the state of the button.
-
#triangle?
Indicates whether the button is currently pressed.
-
#x : GamepadState
Gets the state of the button.
-
#x?
Indicates whether the button is currently pressed.
-
#y : GamepadState
Gets the state of the button.
-
#y?
Indicates whether the button is currently pressed.
Instance Method Detail
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
The states of each gamepad button,
ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.
Gets the state of the button.
This will be one of ButtonState::Pressed
or ButtonState::Released
.