class_inputeventmouse.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/InputEventMouse.xml.
  6. .. _class_InputEventMouse:
  7. InputEventMouse
  8. ===============
  9. **Inherits:** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`InputEventMouseButton<class_InputEventMouseButton>`, :ref:`InputEventMouseMotion<class_InputEventMouseMotion>`
  11. Base input event type for mouse events.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Stores general mouse events information.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`../tutorials/inputs/inputevent`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-------------------------------+------------------------------------------------------------------------+---------------------+
  26. | :ref:`int<class_int>` | :ref:`button_mask<class_InputEventMouse_property_button_mask>` | ``0`` |
  27. +-------------------------------+------------------------------------------------------------------------+---------------------+
  28. | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_InputEventMouse_property_global_position>` | ``Vector2( 0, 0 )`` |
  29. +-------------------------------+------------------------------------------------------------------------+---------------------+
  30. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventMouse_property_position>` | ``Vector2( 0, 0 )`` |
  31. +-------------------------------+------------------------------------------------------------------------+---------------------+
  32. .. rst-class:: classref-section-separator
  33. ----
  34. .. rst-class:: classref-descriptions-group
  35. Property Descriptions
  36. ---------------------
  37. .. _class_InputEventMouse_property_button_mask:
  38. .. rst-class:: classref-property
  39. :ref:`int<class_int>` **button_mask** = ``0``
  40. .. rst-class:: classref-property-setget
  41. - void **set_button_mask** **(** :ref:`int<class_int>` value **)**
  42. - :ref:`int<class_int>` **get_button_mask** **(** **)**
  43. The mouse button mask identifier, one of or a bitwise combination of the :ref:`ButtonList<enum_@GlobalScope_ButtonList>` button masks.
  44. .. rst-class:: classref-item-separator
  45. ----
  46. .. _class_InputEventMouse_property_global_position:
  47. .. rst-class:: classref-property
  48. :ref:`Vector2<class_Vector2>` **global_position** = ``Vector2( 0, 0 )``
  49. .. rst-class:: classref-property-setget
  50. - void **set_global_position** **(** :ref:`Vector2<class_Vector2>` value **)**
  51. - :ref:`Vector2<class_Vector2>` **get_global_position** **(** **)**
  52. When received in :ref:`Node._input<class_Node_method__input>` or :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`, returns the mouse's position in the root :ref:`Viewport<class_Viewport>` using the coordinate system of the root :ref:`Viewport<class_Viewport>`.
  53. When received in :ref:`Control._gui_input<class_Control_method__gui_input>`, returns the mouse's position in the :ref:`CanvasLayer<class_CanvasLayer>` that the :ref:`Control<class_Control>` is in using the coordinate system of the :ref:`CanvasLayer<class_CanvasLayer>`.
  54. .. rst-class:: classref-item-separator
  55. ----
  56. .. _class_InputEventMouse_property_position:
  57. .. rst-class:: classref-property
  58. :ref:`Vector2<class_Vector2>` **position** = ``Vector2( 0, 0 )``
  59. .. rst-class:: classref-property-setget
  60. - void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)**
  61. - :ref:`Vector2<class_Vector2>` **get_position** **(** **)**
  62. When received in :ref:`Node._input<class_Node_method__input>` or :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`, returns the mouse's position in the :ref:`Viewport<class_Viewport>` this :ref:`Node<class_Node>` is in using the coordinate system of this :ref:`Viewport<class_Viewport>`.
  63. When received in :ref:`Control._gui_input<class_Control_method__gui_input>`, returns the mouse's position in the :ref:`Control<class_Control>` using the local coordinate system of the :ref:`Control<class_Control>`.
  64. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  65. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  66. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  67. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`