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 = 0

  • void set_button_index ( int value )

  • int get_button_index ( )

Button identifier. One of the JoystickList button constants.


bool pressed = false

  • void set_pressed ( bool value )

  • bool is_pressed ( )

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


float pressure = 0.0

  • void set_pressure ( float value )

  • float get_pressure ( )

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

Note: This property is never set by the engine and is always 0.