Input event for gamepad buttons.
    public class InputEventJoypadButton : InputEvent

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

Inheritance Chain

Constructors

    public InputEventJoypadButton()

Properties

    public int ButtonIndex { get; set; }

Button identifier. One of the [enum JoystickList] button constants.

    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

    [Obsolete("GetButtonIndex is deprecated. Use the ButtonIndex property instead.")]
    public int GetButtonIndex()

Getter for ButtonIndex

    [Obsolete("GetPressure is deprecated. Use the Pressure property instead.")]
    public float GetPressure()

Getter for Pressure

    [Obsolete("SetButtonIndex is deprecated. Use the ButtonIndex property instead.")]
    public void SetButtonIndex(int buttonIndex)

Setter for ButtonIndex

    [Obsolete("SetPressed is deprecated. Use the Pressed property instead.")]
    public void SetPressed(bool pressed)

Setter for Pressed

    [Obsolete("SetPressure is deprecated. Use the Pressure property instead.")]
    public void SetPressure(float pressure)

Setter for Pressure

Tags: