InputEventMouseButton
Inherits: InputEventMouse < InputEventWithModifiers < InputEventFromWindow < InputEvent < Resource < RefCounted < Object
Description
Section titled “Description”Represents a mouse button being pressed or released.
Stores information about mouse click events. See Entity._input().
Note: On Wear OS devices, rotary input is mapped to MOUSE_BUTTON_WHEEL_UP and MOUSE_BUTTON_WHEEL_DOWN. This can be changed to MOUSE_BUTTON_WHEEL_LEFT and MOUSE_BUTTON_WHEEL_RIGHT with the ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis setting.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| MouseButton | button_index |
0 |
| bool | canceled |
false |
| bool | double_click |
false |
| float | factor |
1.0 |
| bool | pressed |
false |
Property descriptions
Section titled “Property descriptions”button_index
MouseButton button_index = 0
The mouse button identifier, one of the MouseButton button or button wheel constants.
canceled
bool canceled = false
If true, the mouse button event has been canceled.
double_click
bool double_click = false
If true, the mouse button’s state is a double-click.
factor
float factor = 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 be 0 if not supported.
pressed
bool pressed = false
If true, the mouse button’s state is pressed. If false, the mouse button’s state is released.
