class_inputeventmouse.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InputEventMouse.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InputEventMouse:
  6. InputEventMouse
  7. ===============
  8. **Inherits:** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`InputEventMouseButton<class_InputEventMouseButton>`, :ref:`InputEventMouseMotion<class_InputEventMouseMotion>`
  10. **Category:** Core
  11. Brief Description
  12. -----------------
  13. Base input event type for mouse events.
  14. Properties
  15. ----------
  16. +-------------------------------+------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`button_mask<class_InputEventMouse_property_button_mask>` |
  18. +-------------------------------+------------------------------------------------------------------------+
  19. | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_InputEventMouse_property_global_position>` |
  20. +-------------------------------+------------------------------------------------------------------------+
  21. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventMouse_property_position>` |
  22. +-------------------------------+------------------------------------------------------------------------+
  23. Description
  24. -----------
  25. Stores general mouse events information.
  26. Tutorials
  27. ---------
  28. - :doc:`../tutorials/inputs/inputevent`
  29. Property Descriptions
  30. ---------------------
  31. .. _class_InputEventMouse_property_button_mask:
  32. - :ref:`int<class_int>` **button_mask**
  33. +----------+------------------------+
  34. | *Setter* | set_button_mask(value) |
  35. +----------+------------------------+
  36. | *Getter* | get_button_mask() |
  37. +----------+------------------------+
  38. Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK\_\* constants in :ref:`@GlobalScope<class_@GlobalScope>`.
  39. ----
  40. .. _class_InputEventMouse_property_global_position:
  41. - :ref:`Vector2<class_Vector2>` **global_position**
  42. +----------+----------------------------+
  43. | *Setter* | set_global_position(value) |
  44. +----------+----------------------------+
  45. | *Getter* | get_global_position() |
  46. +----------+----------------------------+
  47. Mouse position relative to the current :ref:`Viewport<class_Viewport>` when used in :ref:`Control._gui_input<class_Control_method__gui_input>`, otherwise is at 0,0.
  48. ----
  49. .. _class_InputEventMouse_property_position:
  50. - :ref:`Vector2<class_Vector2>` **position**
  51. +----------+---------------------+
  52. | *Setter* | set_position(value) |
  53. +----------+---------------------+
  54. | *Getter* | get_position() |
  55. +----------+---------------------+
  56. Mouse local position relative to the :ref:`Viewport<class_Viewport>`. If used in :ref:`Control._gui_input<class_Control_method__gui_input>` the position is relative to the current :ref:`Control<class_Control>` which is under the mouse.