Files
godot-docs-l10n/classes/zh_Hans/class_inputeventgesture.rst

71 lines
2.9 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_InputEventGesture:
InputEventGesture
=================
**继承:** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
**派生:** :ref:`InputEventMagnifyGesture<class_InputEventMagnifyGesture>`, :ref:`InputEventPanGesture<class_InputEventPanGesture>`
触摸手势的抽象基类。
.. rst-class:: classref-introduction-group
描述
----
用户在触摸屏上执行支持的手势时会发送 InputEventGesture。无法用鼠标模拟手势因为手势一般都要求多点触控。
.. rst-class:: classref-introduction-group
教程
----
- :doc:`使用 InputEvent <../tutorials/inputs/inputevent>`
.. rst-class:: classref-reftable-group
属性
----
.. table::
:widths: auto
+-------------------------------+------------------------------------------------------------+-------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventGesture_property_position>` | ``Vector2(0, 0)`` |
+-------------------------------+------------------------------------------------------------+-------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
属性说明
--------
.. _class_InputEventGesture_property_position:
.. rst-class:: classref-property
:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventGesture_property_position>`
.. rst-class:: classref-property-setget
- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
- :ref:`Vector2<class_Vector2>` **get_position**\ (\ )
相对于\ :ref:`Viewport<class_Viewport>`\ 的本地手势位置。如果在\ :ref:`Control._gui_input()<class_Control_private_method__gui_input>`\ 中使用,位置是相对于当前接收该手势的控件\ :ref:`Control<class_Control>`\ 而言的。
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)`
.. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)`
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
.. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)`
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)`
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)`
.. |void| replace:: :abbr:`void (无返回值。)`