Skip to content
Download
API reference

InputEventJoypadButton

Inherits: InputEvent < Resource < Shared < Object

Represents a gamepad button being pressed or released.

Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see InputEventJoypadMotion.

TypeNameDefault
JoyButtonbutton_index0
boolpressedfalse
floatpressure0.0

JoyButton button_index = 0

Setter/getter: set_button_index(), get_button_index()

Button identifier. One of the JoyButton button constants.

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.

float pressure = 0.0

Setter/getter: set_pressure(), get_pressure()

No description yet.