class_inputeventmouse.rst 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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>` | 0 |
  18. +-------------------------------+------------------------------------------------------------------------+-----------------+
  19. | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_InputEventMouse_property_global_position>` | Vector2( 0, 0 ) |
  20. +-------------------------------+------------------------------------------------------------------------+-----------------+
  21. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventMouse_property_position>` | Vector2( 0, 0 ) |
  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. | *Default* | 0 |
  35. +-----------+------------------------+
  36. | *Setter* | set_button_mask(value) |
  37. +-----------+------------------------+
  38. | *Getter* | get_button_mask() |
  39. +-----------+------------------------+
  40. The mouse button mask identifier, one of or a bitwise combination of the :ref:`ButtonList<enum_@GlobalScope_ButtonList>` button masks.
  41. .. _class_InputEventMouse_property_global_position:
  42. - :ref:`Vector2<class_Vector2>` **global_position**
  43. +-----------+----------------------------+
  44. | *Default* | Vector2( 0, 0 ) |
  45. +-----------+----------------------------+
  46. | *Setter* | set_global_position(value) |
  47. +-----------+----------------------------+
  48. | *Getter* | get_global_position() |
  49. +-----------+----------------------------+
  50. The global 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.
  51. .. _class_InputEventMouse_property_position:
  52. - :ref:`Vector2<class_Vector2>` **position**
  53. +-----------+---------------------+
  54. | *Default* | Vector2( 0, 0 ) |
  55. +-----------+---------------------+
  56. | *Setter* | set_position(value) |
  57. +-----------+---------------------+
  58. | *Getter* | get_position() |
  59. +-----------+---------------------+
  60. The local mouse 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.