API reference
InputEventJoypadButton
Inherits: InputEvent < Resource < Shared < Object
Represents a gamepad button being pressed or released.
Description
Section titled “Description”Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see InputEventJoypadMotion.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| JoyButton | button_index | 0 |
| bool | pressed | false |
| float | pressure | 0.0 |
Property descriptions
Section titled “Property descriptions”button_index
Section titled “button_index”JoyButton button_index = 0
Setter/getter: set_button_index(), get_button_index()
Button identifier. One of the JoyButton button constants.
pressed
Section titled “pressed”bool pressed = false
Setter/getter: set_pressed(), is_pressed()
If true, the button’s state is pressed. If false, the button’s state is released.
pressure
Section titled “pressure”float pressure = 0.0
Setter/getter: set_pressure(), get_pressure()
No description yet.