:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the InputEventMouse.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_InputEventMouse: InputEventMouse =============== **Inherits:** :ref:`InputEventWithModifiers` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Inherited By:** :ref:`InputEventMouseButton`, :ref:`InputEventMouseMotion` **Category:** Core Brief Description ----------------- Base input event type for mouse events. Properties ---------- +-------------------------------+------------------------------------------------------------------------+ | :ref:`int` | :ref:`button_mask` | +-------------------------------+------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`global_position` | +-------------------------------+------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`position` | +-------------------------------+------------------------------------------------------------------------+ Description ----------- Stores general mouse events information. Tutorials --------- - :doc:`../tutorials/inputs/inputevent` Property Descriptions --------------------- .. _class_InputEventMouse_property_button_mask: - :ref:`int` **button_mask** +----------+------------------------+ | *Setter* | set_button_mask(value) | +----------+------------------------+ | *Getter* | get_button_mask() | +----------+------------------------+ Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK\_\* constants in :ref:`@GlobalScope`. ---- .. _class_InputEventMouse_property_global_position: - :ref:`Vector2` **global_position** +----------+----------------------------+ | *Setter* | set_global_position(value) | +----------+----------------------------+ | *Getter* | get_global_position() | +----------+----------------------------+ Mouse position relative to the current :ref:`Viewport` when used in :ref:`Control._gui_input`, otherwise is at 0,0. ---- .. _class_InputEventMouse_property_position: - :ref:`Vector2` **position** +----------+---------------------+ | *Setter* | set_position(value) | +----------+---------------------+ | *Getter* | get_position() | +----------+---------------------+ Mouse local position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input` the position is relative to the current :ref:`Control` which is under the mouse.