:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the InputEventMouseButton.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_InputEventMouseButton: InputEventMouseButton ===================== **Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Input event type for mouse button events. Description ----------- Contains mouse click information. See :ref:`Node._input`. Tutorials --------- - :doc:`../tutorials/inputs/mouse_and_input_coordinates` Properties ---------- +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`button_index` | ``0`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`doubleclick` | ``false`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`factor` | ``1.0`` | +---------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`pressed` | ``false`` | +---------------------------+------------------------------------------------------------------------+-----------+ Property Descriptions --------------------- .. _class_InputEventMouseButton_property_button_index: - :ref:`int` **button_index** +-----------+-------------------------+ | *Default* | ``0`` | +-----------+-------------------------+ | *Setter* | set_button_index(value) | +-----------+-------------------------+ | *Getter* | get_button_index() | +-----------+-------------------------+ The mouse button identifier, one of the :ref:`ButtonList` button or button wheel constants. ---- .. _class_InputEventMouseButton_property_doubleclick: - :ref:`bool` **doubleclick** +-----------+------------------------+ | *Default* | ``false`` | +-----------+------------------------+ | *Setter* | set_doubleclick(value) | +-----------+------------------------+ | *Getter* | is_doubleclick() | +-----------+------------------------+ If ``true``, the mouse button's state is a double-click. ---- .. _class_InputEventMouseButton_property_factor: - :ref:`float` **factor** +-----------+-------------------+ | *Default* | ``1.0`` | +-----------+-------------------+ | *Setter* | set_factor(value) | +-----------+-------------------+ | *Getter* | 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. ---- .. _class_InputEventMouseButton_property_pressed: - :ref:`bool` **pressed** +-----------+--------------------+ | *Default* | ``false`` | +-----------+--------------------+ | *Setter* | set_pressed(value) | +-----------+--------------------+ | *Getter* | 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.)`