W3cubDocs

/Godot 3.2

InputEventJoypadButton

Inherits: InputEvent < Resource < Reference < Object

Input event for gamepad buttons.

Description

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

Tutorials

Properties

int button_index 0
bool pressed false
float pressure 0.0

Property Descriptions

int button_index

Default 0
Setter set_button_index(value)
Getter get_button_index()

Button identifier. One of the JoystickList button constants.

bool pressed

Default false
Setter set_pressed(value)
Getter is_pressed()

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

float pressure

Default 0.0
Setter set_pressure(value)
Getter get_pressure()

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

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_inputeventjoypadbutton.html