InputEventMouseButton

Inherits:InputEventMouse<InputEventWithModifiers<InputEventFromWindow<InputEvent<Resource<RefCounted<Object

Represents a mouse button being pressed or released.

Description

Stores information about mouse click events. SeeNode._input().

Note: On Wear OS devices, rotary input is mapped to@GlobalScope.MOUSE_BUTTON_WHEEL_UP and@GlobalScope.MOUSE_BUTTON_WHEEL_DOWN. This can be changed to@GlobalScope.MOUSE_BUTTON_WHEEL_LEFT and@GlobalScope.MOUSE_BUTTON_WHEEL_RIGHT with theProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis setting.

Tutorials

Properties

MouseButton

button_index

0

bool

canceled

false

bool

double_click

false

float

factor

1.0

bool

pressed

false


Property Descriptions

MouseButtonbutton_index =0🔗

The mouse button identifier, one of theMouseButton button or button wheel constants.


boolcanceled =false🔗

Iftrue, the mouse button event has been canceled.


booldouble_click =false🔗

Iftrue, the mouse button's state is a double-click.


floatfactor =1.0🔗

The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be0 if not supported.


boolpressed =false🔗

Iftrue, the mouse button's state is pressed. Iffalse, the mouse button's state is released.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.