InputEventJoypadButton

Inherits: InputEvent < Resource < Reference < Object

Category: Core

Brief Description

Input event for gamepad buttons.

Properties

intbutton_index
boolpressed
floatpressure

Description

Input event type for gamepad buttons. For joysticks see InputEventJoypadMotion.

Tutorials

Property Descriptions

  • int button_index
Setterset_button_index(value)
Getterget_button_index()

Button identifier. One of the JOY_BUTTON_* constants from @GlobalScope.


Setterset_pressed(value)
Getteris_pressed()

If true, the button’s state is pressed. If false, the button’s state is released.


Setterset_pressure(value)
Getterget_pressure()

Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from 0 to 1.