Input event for gamepad buttons.
    public class InputEventJoypadButton : InputEvent

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

Inheritance Chain

Constructors

    public InputEventJoypadButton()

Properties

    public int ButtonIndex { get; set; }

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

    public bool Pressed { get; set; }

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

    public float Pressure { get; set; }

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

Methods

    public int GetButtonIndex()

Getter for ButtonIndex

    public float GetPressure()

Getter for Pressure

    public void SetButtonIndex(int buttonIndex)

Setter for ButtonIndex

    public void SetPressed(bool pressed)

Setter for Pressed

    public void SetPressure(float pressure)

Setter for Pressure

Tags: