class_inputeventmousemotion.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_InputEventMouseMotion:
  4. InputEventMouseMotion
  5. =====================
  6. **Category:** Built-In Types
  7. Brief Description
  8. -----------------
  9. Built-in input event type for mouse motion events.
  10. Member Functions
  11. ----------------
  12. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  13. | :ref:`bool<class_bool>` | :ref:`is_action<class_InputEventMouseMotion_is_action>` **(** :ref:`String<class_string>` action **)** |
  14. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_InputEventMouseMotion_is_action_pressed>` **(** :ref:`String<class_string>` action **)** |
  16. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`is_action_released<class_InputEventMouseMotion_is_action_released>` **(** :ref:`String<class_string>` action **)** |
  18. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`is_echo<class_InputEventMouseMotion_is_echo>` **(** **)** |
  20. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`is_pressed<class_InputEventMouseMotion_is_pressed>` **(** **)** |
  22. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_as_action<class_InputEventMouseMotion_set_as_action>` **(** :ref:`String<class_string>` action, :ref:`bool<class_bool>` pressed **)** |
  24. +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  25. Member Variables
  26. ----------------
  27. - :ref:`int<class_int>` **ID** - Event identifier, positive integer increased at each new event.
  28. - :ref:`bool<class_bool>` **alt** - State of the Alt modifier.
  29. - :ref:`int<class_int>` **button_mask** - Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
  30. - :ref:`bool<class_bool>` **control** - State of the Ctrl modifier.
  31. - :ref:`int<class_int>` **device** - Device identifier.
  32. - :ref:`Vector2<class_vector2>` **global_pos** - Global position of the mouse pointer.
  33. - :ref:`int<class_int>` **global_x** - Global X coordinate of the mouse pointer.
  34. - :ref:`int<class_int>` **global_y** - Global Y coordinate of the mouse pointer.
  35. - :ref:`bool<class_bool>` **meta** - State of the Meta modifier.
  36. - :ref:`Vector2<class_vector2>` **pos** - Local position of the mouse pointer.
  37. - :ref:`Vector2<class_vector2>` **relative_pos** - Position of the mouse pointer relative to the previous mouse position.
  38. - :ref:`int<class_int>` **relative_x** - X coordinate of the mouse pointer relative to the previous mouse position.
  39. - :ref:`int<class_int>` **relative_y** - Y coordinate of the mouse pointer relative to the previous mouse position.
  40. - :ref:`bool<class_bool>` **shift** - State of the Shift modifier.
  41. - :ref:`Vector2<class_vector2>` **speed** - Speed of the mouse pointer.
  42. - :ref:`float<class_float>` **speed_x** - Speed of the mouse pointer on the X axis.
  43. - :ref:`float<class_float>` **speed_y** - Speed of the mouse pointer on the Y axis.
  44. - :ref:`int<class_int>` **type** - Type of event (one of the [InputEvent] constants).
  45. - :ref:`int<class_int>` **x** - Local X coordinate of the mouse pointer.
  46. - :ref:`int<class_int>` **y** - Local Y coordinate of the mouse pointer.
  47. Numeric Constants
  48. -----------------
  49. - **NONE** = **0** --- Empty input event.
  50. - **KEY** = **1** --- Key event.
  51. - **MOUSE_MOTION** = **2** --- Mouse motion event.
  52. - **MOUSE_BUTTON** = **3** --- Mouse button event.
  53. - **JOYSTICK_MOTION** = **4** --- Joystick motion event.
  54. - **JOYSTICK_BUTTON** = **5** --- Joystick button event.
  55. - **SCREEN_TOUCH** = **6** --- Screen touch event.
  56. - **SCREEN_DRAG** = **7** --- Screen drag event.
  57. - **ACTION** = **8** --- Pre-defined action event (see :ref:`InputMap<class_inputmap>`).
  58. Description
  59. -----------
  60. Input event type for mouse motion events that extends the global :ref:`InputEvent<class_inputevent>` type.
  61. Member Function Description
  62. ---------------------------
  63. .. _class_InputEventMouseMotion_is_action:
  64. - :ref:`bool<class_bool>` **is_action** **(** :ref:`String<class_string>` action **)**
  65. Return if this input event matches a pre-defined action.
  66. .. _class_InputEventMouseMotion_is_action_pressed:
  67. - :ref:`bool<class_bool>` **is_action_pressed** **(** :ref:`String<class_string>` action **)**
  68. Return whether the given action is being pressed. Not relevant for MOUSE_MOTION events, always false.
  69. .. _class_InputEventMouseMotion_is_action_released:
  70. - :ref:`bool<class_bool>` **is_action_released** **(** :ref:`String<class_string>` action **)**
  71. Return whether the given action is released (i.e. not pressed). Not relevant for MOUSE_MOTION events, can be true or false depending on whether :ref:`is_action<class_InputEventMouseMotion_is_action>` is true.
  72. .. _class_InputEventMouseMotion_is_echo:
  73. - :ref:`bool<class_bool>` **is_echo** **(** **)**
  74. Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
  75. .. _class_InputEventMouseMotion_is_pressed:
  76. - :ref:`bool<class_bool>` **is_pressed** **(** **)**
  77. Return if this input event is pressed. Not relevant for MOUSE_MOTION events, always false.
  78. .. _class_InputEventMouseMotion_set_as_action:
  79. - void **set_as_action** **(** :ref:`String<class_string>` action, :ref:`bool<class_bool>` pressed **)**
  80. Change the input event to an action event of the given name with the (irrelevant for this type) pressed status passed as argument.