class_inputeventscreentouch.rst 4.4 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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventScreenTouch.xml.
  6. .. _class_InputEventScreenTouch:
  7. InputEventScreenTouch
  8. =====================
  9. **Inherits:** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Input event type for screen touch events.
  11. (only available on mobile devices)
  12. Description
  13. -----------
  14. Stores multi-touch press/release information. Supports touch press, touch release and :ref:`index<class_InputEventScreenTouch_property_index>` for multi-touch count and order.
  15. Tutorials
  16. ---------
  17. - :doc:`InputEvent <../tutorials/inputs/inputevent>`
  18. Properties
  19. ----------
  20. +-------------------------------+--------------------------------------------------------------------+-------------------+
  21. | :ref:`bool<class_bool>` | :ref:`double_tap<class_InputEventScreenTouch_property_double_tap>` | ``false`` |
  22. +-------------------------------+--------------------------------------------------------------------+-------------------+
  23. | :ref:`int<class_int>` | :ref:`index<class_InputEventScreenTouch_property_index>` | ``0`` |
  24. +-------------------------------+--------------------------------------------------------------------+-------------------+
  25. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventScreenTouch_property_position>` | ``Vector2(0, 0)`` |
  26. +-------------------------------+--------------------------------------------------------------------+-------------------+
  27. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventScreenTouch_property_pressed>` | ``false`` |
  28. +-------------------------------+--------------------------------------------------------------------+-------------------+
  29. Property Descriptions
  30. ---------------------
  31. .. _class_InputEventScreenTouch_property_double_tap:
  32. - :ref:`bool<class_bool>` **double_tap**
  33. +-----------+-----------------------+
  34. | *Default* | ``false`` |
  35. +-----------+-----------------------+
  36. | *Setter* | set_double_tap(value) |
  37. +-----------+-----------------------+
  38. | *Getter* | is_double_tap() |
  39. +-----------+-----------------------+
  40. If ``true``, the touch's state is a double tap.
  41. ----
  42. .. _class_InputEventScreenTouch_property_index:
  43. - :ref:`int<class_int>` **index**
  44. +-----------+------------------+
  45. | *Default* | ``0`` |
  46. +-----------+------------------+
  47. | *Setter* | set_index(value) |
  48. +-----------+------------------+
  49. | *Getter* | get_index() |
  50. +-----------+------------------+
  51. The touch index in the case of a multi-touch event. One index = one finger.
  52. ----
  53. .. _class_InputEventScreenTouch_property_position:
  54. - :ref:`Vector2<class_Vector2>` **position**
  55. +-----------+---------------------+
  56. | *Default* | ``Vector2(0, 0)`` |
  57. +-----------+---------------------+
  58. | *Setter* | set_position(value) |
  59. +-----------+---------------------+
  60. | *Getter* | get_position() |
  61. +-----------+---------------------+
  62. The touch position, in screen (global) coordinates.
  63. ----
  64. .. _class_InputEventScreenTouch_property_pressed:
  65. - :ref:`bool<class_bool>` **pressed**
  66. +-----------+--------------------+
  67. | *Default* | ``false`` |
  68. +-----------+--------------------+
  69. | *Setter* | set_pressed(value) |
  70. +-----------+--------------------+
  71. | *Getter* | is_pressed() |
  72. +-----------+--------------------+
  73. If ``true``, the touch's state is pressed. If ``false``, the touch's state is released.
  74. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  75. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  76. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  77. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  78. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  79. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`