123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- :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<class_InputEventMouse>` **<** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- Input event type for mouse button events.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Contains mouse click information. See :ref:`Node._input<class_Node_method__input>`.
- \ **Note:** On Wear OS devices, rotary input is mapped to :ref:`@GlobalScope.BUTTON_WHEEL_UP<class_@GlobalScope_constant_BUTTON_WHEEL_UP>` and :ref:`@GlobalScope.BUTTON_WHEEL_DOWN<class_@GlobalScope_constant_BUTTON_WHEEL_DOWN>`. This can be changed to :ref:`@GlobalScope.BUTTON_WHEEL_LEFT<class_@GlobalScope_constant_BUTTON_WHEEL_LEFT>` and :ref:`@GlobalScope.BUTTON_WHEEL_RIGHT<class_@GlobalScope_constant_BUTTON_WHEEL_RIGHT>` with the :ref:`ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis<class_ProjectSettings_property_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<class_int>` | :ref:`button_index<class_InputEventMouseButton_property_button_index>` | ``0`` |
- +---------------------------+------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`canceled<class_InputEventMouseButton_property_canceled>` | ``false`` |
- +---------------------------+------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`doubleclick<class_InputEventMouseButton_property_doubleclick>` | ``false`` |
- +---------------------------+------------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`factor<class_InputEventMouseButton_property_factor>` | ``1.0`` |
- +---------------------------+------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventMouseButton_property_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<class_int>` **button_index** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_button_index** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_button_index** **(** **)**
- The mouse button identifier, one of the :ref:`ButtonList<enum_@GlobalScope_ButtonList>` button or button wheel constants.
- .. rst-class:: classref-item-separator
- ----
- .. _class_InputEventMouseButton_property_canceled:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **canceled** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_canceled** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_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<class_bool>` **doubleclick** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_doubleclick** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_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<class_float>` **factor** = ``1.0``
- .. rst-class:: classref-property-setget
- - void **set_factor** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_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<class_bool>` **pressed** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_pressed** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_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.)`
|