class_inputeventscreentouch.rst 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InputEventScreenTouch.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InputEventScreenTouch:
  6. InputEventScreenTouch
  7. =====================
  8. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Input event type for screen touch events.
  13. (only available on mobile devices)
  14. Properties
  15. ----------
  16. +-------------------------------+----------------------------------------------------------------+-----------------+
  17. | :ref:`int<class_int>` | :ref:`index<class_InputEventScreenTouch_property_index>` | 0 |
  18. +-------------------------------+----------------------------------------------------------------+-----------------+
  19. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventScreenTouch_property_position>` | Vector2( 0, 0 ) |
  20. +-------------------------------+----------------------------------------------------------------+-----------------+
  21. | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventScreenTouch_property_pressed>` | false |
  22. +-------------------------------+----------------------------------------------------------------+-----------------+
  23. Description
  24. -----------
  25. Stores multi-touch press/release information. Supports touch press, touch release and :ref:`index<class_InputEventScreenTouch_property_index>` for multi-touch count and order.
  26. Tutorials
  27. ---------
  28. - :doc:`../tutorials/inputs/inputevent`
  29. Property Descriptions
  30. ---------------------
  31. .. _class_InputEventScreenTouch_property_index:
  32. - :ref:`int<class_int>` **index**
  33. +-----------+------------------+
  34. | *Default* | 0 |
  35. +-----------+------------------+
  36. | *Setter* | set_index(value) |
  37. +-----------+------------------+
  38. | *Getter* | get_index() |
  39. +-----------+------------------+
  40. The touch index in the case of a multi-touch event. One index = one finger.
  41. .. _class_InputEventScreenTouch_property_position:
  42. - :ref:`Vector2<class_Vector2>` **position**
  43. +-----------+---------------------+
  44. | *Default* | Vector2( 0, 0 ) |
  45. +-----------+---------------------+
  46. | *Setter* | set_position(value) |
  47. +-----------+---------------------+
  48. | *Getter* | get_position() |
  49. +-----------+---------------------+
  50. The touch position.
  51. .. _class_InputEventScreenTouch_property_pressed:
  52. - :ref:`bool<class_bool>` **pressed**
  53. +-----------+--------------------+
  54. | *Default* | false |
  55. +-----------+--------------------+
  56. | *Setter* | set_pressed(value) |
  57. +-----------+--------------------+
  58. | *Getter* | is_pressed() |
  59. +-----------+--------------------+
  60. If ``true``, the touch's state is pressed. If ``false``, the touch's state is released.