class_inputeventscreendrag.rst 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/InputEventScreenDrag.xml.
  6. .. _class_InputEventScreenDrag:
  7. InputEventScreenDrag
  8. ====================
  9. **Inherits:** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Represents a screen drag event.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Stores information about screen drag events. See :ref:`Node._input<class_Node_method__input>`.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`Using InputEvent <../tutorials/inputs/inputevent>`
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  25. | :ref:`int<class_int>` | :ref:`index<class_InputEventScreenDrag_property_index>` | ``0`` |
  26. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  27. | :ref:`bool<class_bool>` | :ref:`pen_inverted<class_InputEventScreenDrag_property_pen_inverted>` | ``false`` |
  28. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  29. | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventScreenDrag_property_position>` | ``Vector2(0, 0)`` |
  30. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  31. | :ref:`float<class_float>` | :ref:`pressure<class_InputEventScreenDrag_property_pressure>` | ``0.0`` |
  32. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  33. | :ref:`Vector2<class_Vector2>` | :ref:`relative<class_InputEventScreenDrag_property_relative>` | ``Vector2(0, 0)`` |
  34. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  35. | :ref:`Vector2<class_Vector2>` | :ref:`tilt<class_InputEventScreenDrag_property_tilt>` | ``Vector2(0, 0)`` |
  36. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  37. | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_InputEventScreenDrag_property_velocity>` | ``Vector2(0, 0)`` |
  38. +-------------------------------+-----------------------------------------------------------------------+-------------------+
  39. .. rst-class:: classref-section-separator
  40. ----
  41. .. rst-class:: classref-descriptions-group
  42. Property Descriptions
  43. ---------------------
  44. .. _class_InputEventScreenDrag_property_index:
  45. .. rst-class:: classref-property
  46. :ref:`int<class_int>` **index** = ``0``
  47. .. rst-class:: classref-property-setget
  48. - void **set_index** **(** :ref:`int<class_int>` value **)**
  49. - :ref:`int<class_int>` **get_index** **(** **)**
  50. The drag event index in the case of a multi-drag event.
  51. .. rst-class:: classref-item-separator
  52. ----
  53. .. _class_InputEventScreenDrag_property_pen_inverted:
  54. .. rst-class:: classref-property
  55. :ref:`bool<class_bool>` **pen_inverted** = ``false``
  56. .. rst-class:: classref-property-setget
  57. - void **set_pen_inverted** **(** :ref:`bool<class_bool>` value **)**
  58. - :ref:`bool<class_bool>` **get_pen_inverted** **(** **)**
  59. Returns ``true`` when using the eraser end of a stylus pen.
  60. .. rst-class:: classref-item-separator
  61. ----
  62. .. _class_InputEventScreenDrag_property_position:
  63. .. rst-class:: classref-property
  64. :ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)``
  65. .. rst-class:: classref-property-setget
  66. - void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)**
  67. - :ref:`Vector2<class_Vector2>` **get_position** **(** **)**
  68. The drag position.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_InputEventScreenDrag_property_pressure:
  72. .. rst-class:: classref-property
  73. :ref:`float<class_float>` **pressure** = ``0.0``
  74. .. rst-class:: classref-property-setget
  75. - void **set_pressure** **(** :ref:`float<class_float>` value **)**
  76. - :ref:`float<class_float>` **get_pressure** **(** **)**
  77. Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0``.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_InputEventScreenDrag_property_relative:
  81. .. rst-class:: classref-property
  82. :ref:`Vector2<class_Vector2>` **relative** = ``Vector2(0, 0)``
  83. .. rst-class:: classref-property-setget
  84. - void **set_relative** **(** :ref:`Vector2<class_Vector2>` value **)**
  85. - :ref:`Vector2<class_Vector2>` **get_relative** **(** **)**
  86. The drag position relative to the previous position (position at the last frame).
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_InputEventScreenDrag_property_tilt:
  90. .. rst-class:: classref-property
  91. :ref:`Vector2<class_Vector2>` **tilt** = ``Vector2(0, 0)``
  92. .. rst-class:: classref-property-setget
  93. - void **set_tilt** **(** :ref:`Vector2<class_Vector2>` value **)**
  94. - :ref:`Vector2<class_Vector2>` **get_tilt** **(** **)**
  95. Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from ``-1.0`` to ``1.0`` for both axes.
  96. .. rst-class:: classref-item-separator
  97. ----
  98. .. _class_InputEventScreenDrag_property_velocity:
  99. .. rst-class:: classref-property
  100. :ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)``
  101. .. rst-class:: classref-property-setget
  102. - void **set_velocity** **(** :ref:`Vector2<class_Vector2>` value **)**
  103. - :ref:`Vector2<class_Vector2>` **get_velocity** **(** **)**
  104. The drag velocity.
  105. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  106. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  107. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  108. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  109. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  110. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`