class_inputeventmouse.rst 3.0 KB

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