mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
225 lines
11 KiB
ReStructuredText
225 lines
11 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_InputEventScreenDrag:
|
|
|
|
InputEventScreenDrag
|
|
====================
|
|
|
|
**Eredita:** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Rappresenta un evento di trascinamento dello schermo.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descrizione
|
|
----------------------
|
|
|
|
Memorizza informazioni sugli eventi di trascinamento dello schermo. Vedi :ref:`Node._input()<class_Node_private_method__input>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorial
|
|
----------------
|
|
|
|
- :doc:`Utilizzo di InputEvent <../tutorials/inputs/inputevent>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Proprietà
|
|
------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`int<class_int>` | :ref:`index<class_InputEventScreenDrag_property_index>` | ``0`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`pen_inverted<class_InputEventScreenDrag_property_pen_inverted>` | ``false`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventScreenDrag_property_position>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`float<class_float>` | :ref:`pressure<class_InputEventScreenDrag_property_pressure>` | ``0.0`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`relative<class_InputEventScreenDrag_property_relative>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`screen_relative<class_InputEventScreenDrag_property_screen_relative>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`screen_velocity<class_InputEventScreenDrag_property_screen_velocity>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`tilt<class_InputEventScreenDrag_property_tilt>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_InputEventScreenDrag_property_velocity>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------+-------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni delle proprietà
|
|
------------------------------------------------------
|
|
|
|
.. _class_InputEventScreenDrag_property_index:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **index** = ``0`` :ref:`🔗<class_InputEventScreenDrag_property_index>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_index**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_index**\ (\ )
|
|
|
|
Indice dell'evento di trascinamento nel caso di un evento multi-trascinamento.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_pen_inverted:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **pen_inverted** = ``false`` :ref:`🔗<class_InputEventScreenDrag_property_pen_inverted>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_pen_inverted**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_pen_inverted**\ (\ )
|
|
|
|
Restituisce ``true`` quando si utilizza l'estremità del gommino di una penna stilo.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_position:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_position>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
|
- :ref:`Vector2<class_Vector2>` **get_position**\ (\ )
|
|
|
|
Posizione di trascinamento nella viewport in cui si trova il nodo, utilizzando il sistema di coordinate di questa viewport.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_pressure:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **pressure** = ``0.0`` :ref:`🔗<class_InputEventScreenDrag_property_pressure>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_pressure**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_pressure**\ (\ )
|
|
|
|
Rappresenta la pressione che l'utente esercita sulla penna. Varia da ``0.0`` a ``1.0``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_relative:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector2<class_Vector2>` **relative** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_relative>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_relative**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
|
- :ref:`Vector2<class_Vector2>` **get_relative**\ (\ )
|
|
|
|
La posizione di trascinamento relativa alla posizione precedente (posizione all'ultimo frame).
|
|
|
|
\ **Nota:** :ref:`relative<class_InputEventScreenDrag_property_relative>` è ridimensionato automaticamente in base al fattore di scala del contenuto, definito dalle impostazioni della modalità di allargamento del progetto. Ciò significa che la sensibilità al tocco apparirà diversa a seconda della risoluzione quando si utilizza :ref:`relative<class_InputEventScreenDrag_property_relative>` in uno script che gestisce la mira tramite tocco. Per evitare ciò, utilizza invece :ref:`screen_relative<class_InputEventScreenDrag_property_screen_relative>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_screen_relative:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector2<class_Vector2>` **screen_relative** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_screen_relative>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_screen_relative**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
|
- :ref:`Vector2<class_Vector2>` **get_screen_relative**\ (\ )
|
|
|
|
La posizione di trascinamento non ridimensionata relativa alla posizione precedente nelle coordinate dello schermo (posizione all'ultimo frame). Questa posizione *non* è ridimensionata in base al fattore di scala del contenuto o alle chiamate a :ref:`InputEvent.xformed_by()<class_InputEvent_method_xformed_by>`. Questa dovrebbe essere preferita a :ref:`relative<class_InputEventScreenDrag_property_relative>` per la mira tramite tocco a prescindere dalla modalità di allargamento del progetto.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_screen_velocity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector2<class_Vector2>` **screen_velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_screen_velocity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_screen_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
|
- :ref:`Vector2<class_Vector2>` **get_screen_velocity**\ (\ )
|
|
|
|
La velocità di trascinamento non ridimensionata in pixel al secondo nelle coordinate dello schermo. Questa velocità *non* è ridimensionata in base al fattore di scala del contenuto o alle chiamate a :ref:`InputEvent.xformed_by()<class_InputEvent_method_xformed_by>`. Questa dovrebbe essere preferita a :ref:`velocity<class_InputEventScreenDrag_property_velocity>` per la mira tramite tocco a prescindere dalla modalità di allargamento del progetto.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_tilt:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector2<class_Vector2>` **tilt** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_tilt>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_tilt**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
|
- :ref:`Vector2<class_Vector2>` **get_tilt**\ (\ )
|
|
|
|
Rappresenta gli angoli di inclinazione della penna. Il valore positivo della coordinata X indica un'inclinazione verso destra. Il valore positivo della coordinata Y indica un'inclinazione verso l'utente. Varia da ``-1.0`` a ``1.0`` per entrambi gli assi.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_InputEventScreenDrag_property_velocity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_velocity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
|
- :ref:`Vector2<class_Vector2>` **get_velocity**\ (\ )
|
|
|
|
La velocità di trascinamento.
|
|
|
|
\ **Nota:** :ref:`velocity<class_InputEventScreenDrag_property_velocity>` è automaticamente ridimensionata in base al fattore di scala del contenuto, definito dalle impostazioni della modalità di allargamento del progetto. Ciò significa che la sensibilità al tocco apparirà diversa a seconda della risoluzione quando si utilizza :ref:`velocity<class_InputEventScreenDrag_property_velocity>` in uno script che gestisce la mira tramite tocco. Per evitare ciò, utilizza invece :ref:`screen_velocity<class_InputEventScreenDrag_property_screen_velocity>`.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
|
|
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
|
|
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`
|