class_inputeventscreentouch.rst 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the InputEventScreenTouch.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_InputEventScreenTouch:
  5. InputEventScreenTouch
  6. =====================
  7. **Inherits:** :ref:`InputEvent<class_inputevent>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Input event type for screen touch events.
  12. (only available on mobile devices)
  13. Member Functions
  14. ----------------
  15. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_index<class_InputEventScreenTouch_get_index>` **(** **)** const |
  17. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`Vector2<class_vector2>` | :ref:`get_position<class_InputEventScreenTouch_get_position>` **(** **)** const |
  19. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_index<class_InputEventScreenTouch_set_index>` **(** :ref:`int<class_int>` index **)** |
  21. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`set_position<class_InputEventScreenTouch_set_position>` **(** :ref:`Vector2<class_vector2>` position **)** |
  23. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`set_pressed<class_InputEventScreenTouch_set_pressed>` **(** :ref:`bool<class_bool>` pressed **)** |
  25. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  26. Member Variables
  27. ----------------
  28. - :ref:`int<class_int>` **index** - Touch index in the case of a multi-touch event. One index = one finger.
  29. - :ref:`Vector2<class_vector2>` **position** - Touch position.
  30. - :ref:`bool<class_bool>` **pressed** - If ``true`` the touch's state is pressed. If ``false`` the touch's state is released.
  31. Description
  32. -----------
  33. Stores multi-touch press/release information. Supports touch press, touch release and member index for multi-touch count and order.
  34. Member Function Description
  35. ---------------------------
  36. .. _class_InputEventScreenTouch_get_index:
  37. - :ref:`int<class_int>` **get_index** **(** **)** const
  38. .. _class_InputEventScreenTouch_get_position:
  39. - :ref:`Vector2<class_vector2>` **get_position** **(** **)** const
  40. .. _class_InputEventScreenTouch_set_index:
  41. - void **set_index** **(** :ref:`int<class_int>` index **)**
  42. .. _class_InputEventScreenTouch_set_position:
  43. - void **set_position** **(** :ref:`Vector2<class_vector2>` position **)**
  44. .. _class_InputEventScreenTouch_set_pressed:
  45. - void **set_pressed** **(** :ref:`bool<class_bool>` pressed **)**