class_inputevent.rst 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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_InputEvent:
  4. InputEvent
  5. ==========
  6. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Inherited By:** :ref:`InputEventScreenTouch<class_inputeventscreentouch>`, :ref:`InputEventWithModifiers<class_inputeventwithmodifiers>`, :ref:`InputEventScreenDrag<class_inputeventscreendrag>`, :ref:`InputEventJoypadMotion<class_inputeventjoypadmotion>`, :ref:`InputEventJoypadButton<class_inputeventjoypadbutton>`, :ref:`InputEventAction<class_inputeventaction>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Member Functions
  12. ----------------
  13. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`bool<class_bool>` | :ref:`action_match<class_InputEvent_action_match>` **(** :ref:`InputEvent<class_inputevent>` event **)** const |
  15. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`String<class_string>` | :ref:`as_text<class_InputEvent_as_text>` **(** **)** const |
  17. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`int<class_int>` | :ref:`get_device<class_InputEvent_get_device>` **(** **)** const |
  19. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`get_id<class_InputEvent_get_id>` **(** **)** const |
  21. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`is_action<class_InputEvent_is_action>` **(** :ref:`String<class_string>` action **)** const |
  23. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_InputEvent_is_action_pressed>` **(** :ref:`String<class_string>` action **)** const |
  25. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`is_action_released<class_InputEvent_is_action_released>` **(** :ref:`String<class_string>` action **)** const |
  27. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`is_action_type<class_InputEvent_is_action_type>` **(** **)** const |
  29. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`is_echo<class_InputEvent_is_echo>` **(** **)** const |
  31. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`is_pressed<class_InputEvent_is_pressed>` **(** **)** const |
  33. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`set_device<class_InputEvent_set_device>` **(** :ref:`int<class_int>` device **)** |
  35. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`set_id<class_InputEvent_set_id>` **(** :ref:`int<class_int>` id **)** |
  37. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`shortcut_match<class_InputEvent_shortcut_match>` **(** :ref:`InputEvent<class_inputevent>` event **)** const |
  39. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`InputEvent<class_inputevent>` | :ref:`xformed_by<class_InputEvent_xformed_by>` **(** :ref:`Transform2D<class_transform2d>` xform, :ref:`Vector2<class_vector2>` local_ofs=Vector2(0, 0) **)** const |
  41. +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. Member Variables
  43. ----------------
  44. - :ref:`int<class_int>` **device**
  45. Member Function Description
  46. ---------------------------
  47. .. _class_InputEvent_action_match:
  48. - :ref:`bool<class_bool>` **action_match** **(** :ref:`InputEvent<class_inputevent>` event **)** const
  49. .. _class_InputEvent_as_text:
  50. - :ref:`String<class_string>` **as_text** **(** **)** const
  51. .. _class_InputEvent_get_device:
  52. - :ref:`int<class_int>` **get_device** **(** **)** const
  53. .. _class_InputEvent_get_id:
  54. - :ref:`int<class_int>` **get_id** **(** **)** const
  55. .. _class_InputEvent_is_action:
  56. - :ref:`bool<class_bool>` **is_action** **(** :ref:`String<class_string>` action **)** const
  57. Return if this input event matches a pre-defined action, no matter the type.
  58. .. _class_InputEvent_is_action_pressed:
  59. - :ref:`bool<class_bool>` **is_action_pressed** **(** :ref:`String<class_string>` action **)** const
  60. Return whether the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
  61. .. _class_InputEvent_is_action_released:
  62. - :ref:`bool<class_bool>` **is_action_released** **(** :ref:`String<class_string>` action **)** const
  63. Return whether the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
  64. .. _class_InputEvent_is_action_type:
  65. - :ref:`bool<class_bool>` **is_action_type** **(** **)** const
  66. .. _class_InputEvent_is_echo:
  67. - :ref:`bool<class_bool>` **is_echo** **(** **)** const
  68. Return if this input event is an echo event (only for events of type KEY, it will return false for other types).
  69. .. _class_InputEvent_is_pressed:
  70. - :ref:`bool<class_bool>` **is_pressed** **(** **)** const
  71. Return if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
  72. .. _class_InputEvent_set_device:
  73. - void **set_device** **(** :ref:`int<class_int>` device **)**
  74. .. _class_InputEvent_set_id:
  75. - void **set_id** **(** :ref:`int<class_int>` id **)**
  76. .. _class_InputEvent_shortcut_match:
  77. - :ref:`bool<class_bool>` **shortcut_match** **(** :ref:`InputEvent<class_inputevent>` event **)** const
  78. .. _class_InputEvent_xformed_by:
  79. - :ref:`InputEvent<class_inputevent>` **xformed_by** **(** :ref:`Transform2D<class_transform2d>` xform, :ref:`Vector2<class_vector2>` local_ofs=Vector2(0, 0) **)** const