:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/InputEventMouseButton.xml. .. _class_InputEventMouseButton: InputEventMouseButton ===================== **Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Input event type for mouse button events. .. rst-class:: classref-introduction-group Description ----------- Contains mouse click information. See :ref:`Node._input`. \ **Note:** On Wear OS devices, rotary input is mapped to :ref:`@GlobalScope.BUTTON_WHEEL_UP` and :ref:`@GlobalScope.BUTTON_WHEEL_DOWN`. This can be changed to :ref:`@GlobalScope.BUTTON_WHEEL_LEFT` and :ref:`@GlobalScope.BUTTON_WHEEL_RIGHT` with the :ref:`ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis` setting. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`../tutorials/inputs/mouse_and_input_coordinates` .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`button_index` | ``0`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`canceled` | ``false`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`doubleclick` | ``false`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`factor` | ``1.0`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`pressed` | ``false`` | +---------------------------+------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventMouseButton_property_button_index: .. rst-class:: classref-property :ref:`int` **button_index** = ``0`` .. rst-class:: classref-property-setget - void **set_button_index** **(** :ref:`int` value **)** - :ref:`int` **get_button_index** **(** **)** The mouse button identifier, one of the :ref:`ButtonList` button or button wheel constants. .. rst-class:: classref-item-separator ---- .. _class_InputEventMouseButton_property_canceled: .. rst-class:: classref-property :ref:`bool` **canceled** = ``false`` .. rst-class:: classref-property-setget - void **set_canceled** **(** :ref:`bool` value **)** - :ref:`bool` **is_canceled** **(** **)** If ``true``, the mouse button event has been canceled. .. rst-class:: classref-item-separator ---- .. _class_InputEventMouseButton_property_doubleclick: .. rst-class:: classref-property :ref:`bool` **doubleclick** = ``false`` .. rst-class:: classref-property-setget - void **set_doubleclick** **(** :ref:`bool` value **)** - :ref:`bool` **is_doubleclick** **(** **)** If ``true``, the mouse button's state is a double-click. .. rst-class:: classref-item-separator ---- .. _class_InputEventMouseButton_property_factor: .. rst-class:: classref-property :ref:`float` **factor** = ``1.0`` .. rst-class:: classref-property-setget - void **set_factor** **(** :ref:`float` value **)** - :ref:`float` **get_factor** **(** **)** 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. .. rst-class:: classref-item-separator ---- .. _class_InputEventMouseButton_property_pressed: .. rst-class:: classref-property :ref:`bool` **pressed** = ``false`` .. rst-class:: classref-property-setget - void **set_pressed** **(** :ref:`bool` value **)** - :ref:`bool` **is_pressed** **(** **)** If ``true``, the mouse button's state is pressed. If ``false``, the mouse button's state is released. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`