W3cubDocs

/Godot 3.1

InputEventJoypadButton

Inherits: InputEvent < Resource < Reference < Object

Category: Core

Brief Description

Input event for gamepad buttons.

Properties

int button_index
bool pressed
float pressure

Description

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

Tutorials

Property Descriptions

int button_index

Setter set_button_index(value)
Getter get_button_index()

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

bool pressed

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

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–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
http://docs.godotengine.org/en/3.1/classes/class_inputeventjoypadbutton.html