Input event type for mouse button events.
    public class InputEventMouseButton : InputEventMouse

Contains mouse click information. See Node._Input(Godot.InputEvent).

Inheritance Chain


    public InputEventMouseButton()


    public int ButtonIndex { get; set; }

Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@GlobalScope].

    public bool Doubleclick { get; set; }

If true, the mouse button’s state is a double-click.

    public float Factor { get; set; }

Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported.

    public bool Pressed { get; set; }

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


    public int GetButtonIndex()

Getter for ButtonIndex

    public float GetFactor()

Getter for Factor

    public bool IsDoubleclick()

Getter for Doubleclick

    public void SetButtonIndex(int buttonIndex)

Setter for ButtonIndex

    public void SetDoubleclick(bool doubleclick)

Setter for Doubleclick

    public void SetFactor(float factor)

Setter for Factor

    public void SetPressed(bool pressed)

Setter for Pressed