class_inputeventmouse.rst 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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. Base input event type for mouse events.
  11. Description
  12. -----------
  13. Stores general mouse events information.
  14. Tutorials
  15. ---------
  16. - :doc:`../tutorials/inputs/inputevent`
  17. Properties
  18. ----------
  19. +-------------------------------+------------------------------------------------------------------------+---------------------+
  20. | :ref:`int<class_int>` | :ref:`button_mask<class_InputEventMouse_property_button_mask>` | ``0`` |
  21. +-------------------------------+------------------------------------------------------------------------+---------------------+
  22. | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_InputEventMouse_property_global_position>` | ``Vector2( 0, 0 )`` |
  23. +-------------------------------+------------------------------------------------------------------------+---------------------+
  24. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventMouse_property_position>` | ``Vector2( 0, 0 )`` |
  25. +-------------------------------+------------------------------------------------------------------------+---------------------+
  26. Property Descriptions
  27. ---------------------
  28. .. _class_InputEventMouse_property_button_mask:
  29. - :ref:`int<class_int>` **button_mask**
  30. +-----------+------------------------+
  31. | *Default* | ``0`` |
  32. +-----------+------------------------+
  33. | *Setter* | set_button_mask(value) |
  34. +-----------+------------------------+
  35. | *Getter* | get_button_mask() |
  36. +-----------+------------------------+
  37. The mouse button mask identifier, one of or a bitwise combination of the :ref:`ButtonList<enum_@GlobalScope_ButtonList>` button masks.
  38. ----
  39. .. _class_InputEventMouse_property_global_position:
  40. - :ref:`Vector2<class_Vector2>` **global_position**
  41. +-----------+----------------------------+
  42. | *Default* | ``Vector2( 0, 0 )`` |
  43. +-----------+----------------------------+
  44. | *Setter* | set_global_position(value) |
  45. +-----------+----------------------------+
  46. | *Getter* | get_global_position() |
  47. +-----------+----------------------------+
  48. The global mouse position relative to the current :ref:`Viewport<class_Viewport>`. If used in :ref:`Control._gui_input<class_Control_method__gui_input>` and if the current :ref:`Control<class_Control>` is not under the mouse, moving it will not update this value.
  49. ----
  50. .. _class_InputEventMouse_property_position:
  51. - :ref:`Vector2<class_Vector2>` **position**
  52. +-----------+---------------------+
  53. | *Default* | ``Vector2( 0, 0 )`` |
  54. +-----------+---------------------+
  55. | *Setter* | set_position(value) |
  56. +-----------+---------------------+
  57. | *Getter* | get_position() |
  58. +-----------+---------------------+
  59. 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. If the current :ref:`Control<class_Control>` is not under the mouse, moving it will not update this value.
  60. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  61. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  62. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`