:github_url: hide .. Generated automatically by doc/tools/makerst.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` **Category:** Core Brief Description ----------------- Input event type for mouse button events. Properties ---------- +---------------------------+------------------------------------------------------------------------+ | :ref:`int` | :ref:`button_index` | +---------------------------+------------------------------------------------------------------------+ | :ref:`bool` | :ref:`doubleclick` | +---------------------------+------------------------------------------------------------------------+ | :ref:`float` | :ref:`factor` | +---------------------------+------------------------------------------------------------------------+ | :ref:`bool` | :ref:`pressed` | +---------------------------+------------------------------------------------------------------------+ Description ----------- Contains mouse click information. See :ref:`Node._input`. Tutorials --------- - :doc:`../tutorials/inputs/mouse_and_input_coordinates` Property Descriptions --------------------- .. _class_InputEventMouseButton_property_button_index: - :ref:`int` **button_index** +----------+-------------------------+ | *Setter* | set_button_index(value) | +----------+-------------------------+ | *Getter* | get_button_index() | +----------+-------------------------+ Mouse button identifier, one of the BUTTON\_\* or BUTTON_WHEEL\_\* constants in :ref:`@GlobalScope`. ---- .. _class_InputEventMouseButton_property_doubleclick: - :ref:`bool` **doubleclick** +----------+------------------------+ | *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** +----------+-------------------+ | *Setter* | set_factor(value) | +----------+-------------------+ | *Getter* | get_factor() | +----------+-------------------+ Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported. ---- .. _class_InputEventMouseButton_property_pressed: - :ref:`bool` **pressed** +----------+--------------------+ | *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.