mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
863 lines
73 KiB
ReStructuredText
863 lines
73 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_GraphNode:
|
|
|
|
GraphNode
|
|
=========
|
|
|
|
**Sperimentale:** This class may be changed or removed in future versions.
|
|
|
|
**Eredita:** :ref:`GraphElement<class_GraphElement>` **<** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
Un contenitore con porte di collegamento, che rappresenta un nodo in un :ref:`GraphEdit<class_GraphEdit>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descrizione
|
|
----------------------
|
|
|
|
**GraphNode** consente di creare nodi per un grafico :ref:`GraphEdit<class_GraphEdit>` con contenuti personalizzabili in base ai suoi controlli figlio. **GraphNode** deriva da :ref:`Container<class_Container>` ed è responsabile del posizionamento dei suoi figli sullo schermo. Funziona in modo simile a :ref:`VBoxContainer<class_VBoxContainer>`. I figli, a loro volta, forniscono a **GraphNode** i cosiddetti slot, ognuno dei quali può avere una porta di collegamento su entrambi i lati.
|
|
|
|
Ogni slot **GraphNode** è definito dal suo indice e può fornire al nodo fino a due porte: una a sinistra e una a destra. Per convenzione, la porta sinistra è anche definita **porta d'ingresso** e la porta destra è definita **porta d'uscita**. Ogni porta può essere abilitata e configurata individualmente, utilizzando un tipo e un colore diversi. Il tipo è un valore arbitrario che si può definire a piacere. Il :ref:`GraphEdit<class_GraphEdit>` padre riceverà queste informazioni su ogni richiesta di collegamento e scollegamento.
|
|
|
|
Gli slot si possono configurare nel pannello dell'Ispettore una volta aggiunto almeno un :ref:`Control<class_Control>` figlio. Le proprietà sono raggruppate in base all'indice di ogni slot nella sezione "Slot".
|
|
|
|
\ **Nota:** Mentre GraphNode è configurato tramite slot e indici di slot, i collegamenti sono effettuati tra le porte che sono abilitate. Per questo motivo :ref:`GraphEdit<class_GraphEdit>` utilizza l'indice della porta e non quello dello slot. È possibile usare :ref:`get_input_port_slot()<class_GraphNode_method_get_input_port_slot>` e :ref:`get_output_port_slot()<class_GraphNode_method_get_output_port_slot>` per ottenere l'indice dello slot dall'indice della porta.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Proprietà
|
|
------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
|
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``3`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
|
|
+----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`ignore_invalid_connection_type<class_GraphNode_property_ignore_invalid_connection_type>` | ``false`` |
|
|
+----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
|
| :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``0`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) |
|
|
+----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
|
| :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`slots_focus_mode<class_GraphNode_property_slots_focus_mode>` | ``3`` |
|
|
+----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`title<class_GraphNode_property_title>` | ``""`` |
|
|
+----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Metodi
|
|
------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_draw_port<class_GraphNode_private_method__draw_port>`\ (\ slot_index\: :ref:`int<class_int>`, position\: :ref:`Vector2i<class_Vector2i>`, left\: :ref:`bool<class_bool>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clear_all_slots<class_GraphNode_method_clear_all_slots>`\ (\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clear_slot<class_GraphNode_method_clear_slot>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`get_input_port_color<class_GraphNode_method_get_input_port_color>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_input_port_count<class_GraphNode_method_get_input_port_count>`\ (\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_input_port_position<class_GraphNode_method_get_input_port_position>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_input_port_slot<class_GraphNode_method_get_input_port_slot>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_input_port_type<class_GraphNode_method_get_input_port_type>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`get_output_port_color<class_GraphNode_method_get_output_port_color>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_output_port_count<class_GraphNode_method_get_output_port_count>`\ (\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_output_port_position<class_GraphNode_method_get_output_port_position>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_output_port_slot<class_GraphNode_method_get_output_port_slot>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_output_port_type<class_GraphNode_method_get_output_port_type>`\ (\ port_idx\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`get_slot_color_left<class_GraphNode_method_get_slot_color_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`get_slot_color_right<class_GraphNode_method_get_slot_color_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_slot_custom_icon_left<class_GraphNode_method_get_slot_custom_icon_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_slot_custom_icon_right<class_GraphNode_method_get_slot_custom_icon_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_slot_metadata_left<class_GraphNode_method_get_slot_metadata_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_slot_metadata_right<class_GraphNode_method_get_slot_metadata_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_slot_type_left<class_GraphNode_method_get_slot_type_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_slot_type_right<class_GraphNode_method_get_slot_type_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`HBoxContainer<class_HBoxContainer>` | :ref:`get_titlebar_hbox<class_GraphNode_method_get_titlebar_hbox>`\ (\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_slot_draw_stylebox<class_GraphNode_method_is_slot_draw_stylebox>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_slot_enabled_left<class_GraphNode_method_is_slot_enabled_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_slot_enabled_right<class_GraphNode_method_is_slot_enabled_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot<class_GraphNode_method_set_slot>`\ (\ slot_index\: :ref:`int<class_int>`, enable_left_port\: :ref:`bool<class_bool>`, type_left\: :ref:`int<class_int>`, color_left\: :ref:`Color<class_Color>`, enable_right_port\: :ref:`bool<class_bool>`, type_right\: :ref:`int<class_int>`, color_right\: :ref:`Color<class_Color>`, custom_icon_left\: :ref:`Texture2D<class_Texture2D>` = null, custom_icon_right\: :ref:`Texture2D<class_Texture2D>` = null, draw_stylebox\: :ref:`bool<class_bool>` = true\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_color_left<class_GraphNode_method_set_slot_color_left>`\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_color_right<class_GraphNode_method_set_slot_color_right>`\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_custom_icon_left<class_GraphNode_method_set_slot_custom_icon_left>`\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_custom_icon_right<class_GraphNode_method_set_slot_custom_icon_right>`\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_draw_stylebox<class_GraphNode_method_set_slot_draw_stylebox>`\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_enabled_left<class_GraphNode_method_set_slot_enabled_left>`\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_enabled_right<class_GraphNode_method_set_slot_enabled_right>`\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_metadata_left<class_GraphNode_method_set_slot_metadata_left>`\ (\ slot_index\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_metadata_right<class_GraphNode_method_set_slot_metadata_right>`\ (\ slot_index\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_type_left<class_GraphNode_method_set_slot_type_left>`\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_slot_type_right<class_GraphNode_method_set_slot_type_right>`\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Proprietà del tema
|
|
------------------------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`resizer_color<class_GraphNode_theme_color_resizer_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`port_h_offset<class_GraphNode_theme_constant_port_h_offset>` | ``0`` |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`separation<class_GraphNode_theme_constant_separation>` | ``2`` |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`Texture2D<class_Texture2D>` | :ref:`port<class_GraphNode_theme_icon_port>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_GraphNode_theme_style_panel>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`panel_focus<class_GraphNode_theme_style_panel_focus>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`panel_selected<class_GraphNode_theme_style_panel_selected>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`slot<class_GraphNode_theme_style_slot>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`slot_selected<class_GraphNode_theme_style_slot_selected>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`titlebar<class_GraphNode_theme_style_titlebar>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
| :ref:`StyleBox<class_StyleBox>` | :ref:`titlebar_selected<class_GraphNode_theme_style_titlebar_selected>` | |
|
|
+-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Segnali
|
|
--------------
|
|
|
|
.. _class_GraphNode_signal_slot_sizes_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**slot_sizes_changed**\ (\ ) :ref:`🔗<class_GraphNode_signal_slot_sizes_changed>`
|
|
|
|
Emesso quando le dimensioni di qualunque slot potrebbero essere cambiate.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_signal_slot_updated:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**slot_updated**\ (\ slot_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_signal_slot_updated>`
|
|
|
|
Emesso quando viene aggiornato uno slot di GraphNode.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni delle proprietà
|
|
------------------------------------------------------
|
|
|
|
.. _class_GraphNode_property_ignore_invalid_connection_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **ignore_invalid_connection_type** = ``false`` :ref:`🔗<class_GraphNode_property_ignore_invalid_connection_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_ignore_invalid_connection_type**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_ignoring_valid_connection_type**\ (\ )
|
|
|
|
Se ``true``, è possibile collegare porte con tipi diversi, anche se il collegamento non è stato esplicitamente consentito nel :ref:`GraphEdit<class_GraphEdit>` padre.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_property_slots_focus_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`FocusMode<enum_Control_FocusMode>` **slots_focus_mode** = ``3`` :ref:`🔗<class_GraphNode_property_slots_focus_mode>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_slots_focus_mode**\ (\ value\: :ref:`FocusMode<enum_Control_FocusMode>`\ )
|
|
- :ref:`FocusMode<enum_Control_FocusMode>` **get_slots_focus_mode**\ (\ )
|
|
|
|
Determina come si possono focalizzare gli slot dei collegamenti.
|
|
|
|
- Se impostato su :ref:`Control.FOCUS_CLICK<class_Control_constant_FOCUS_CLICK>`, i collegamenti si possono creare solo con il mouse.
|
|
|
|
- Se impostato su :ref:`Control.FOCUS_ALL<class_Control_constant_FOCUS_ALL>`, gli slot si possono focalizzare anche attraverso le azioni di input :ref:`ProjectSettings.input/ui_up<class_ProjectSettings_property_input/ui_up>` e :ref:`ProjectSettings.input/ui_down<class_ProjectSettings_property_input/ui_down>` e collegati attraverso le azioni di input :ref:`ProjectSettings.input/ui_left<class_ProjectSettings_property_input/ui_left>` e :ref:`ProjectSettings.input/ui_right<class_ProjectSettings_property_input/ui_right>`.
|
|
|
|
- Se impostato su :ref:`Control.FOCUS_ACCESSIBILITY<class_Control_constant_FOCUS_ACCESSIBILITY>`, le azioni di input per gli slot sono abilitate solo quando il lettore dello schermo è attivo.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_property_title:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **title** = ``""`` :ref:`🔗<class_GraphNode_property_title>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ )
|
|
- :ref:`String<class_String>` **get_title**\ (\ )
|
|
|
|
Il testo visualizzato nella barra del titolo del GraphNode.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni dei metodi
|
|
--------------------------------------------
|
|
|
|
.. _class_GraphNode_private_method__draw_port:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_draw_port**\ (\ slot_index\: :ref:`int<class_int>`, position\: :ref:`Vector2i<class_Vector2i>`, left\: :ref:`bool<class_bool>`, color\: :ref:`Color<class_Color>`\ ) |virtual| :ref:`🔗<class_GraphNode_private_method__draw_port>`
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_clear_all_slots:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clear_all_slots**\ (\ ) :ref:`🔗<class_GraphNode_method_clear_all_slots>`
|
|
|
|
Disabilita tutti gli slot del GraphNode. Questo rimuoverà tutte le porte di ingresso e di uscita dal GraphNode.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_clear_slot:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clear_slot**\ (\ slot_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_clear_slot>`
|
|
|
|
Disabilita lo slot con l'indice ``slot_index`` specificato. Ciò rimuoverà la porta di ingresso e di uscita corrispondente dal GraphNode.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_input_port_color:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Color<class_Color>` **get_input_port_color**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_color>`
|
|
|
|
Restituisce il :ref:`Color<class_Color>` della porta di ingresso con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_input_port_count:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_input_port_count**\ (\ ) :ref:`🔗<class_GraphNode_method_get_input_port_count>`
|
|
|
|
Restituisce il numero di slot con una porta di ingresso abilitata.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_input_port_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector2<class_Vector2>` **get_input_port_position**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_position>`
|
|
|
|
Restituisce la posizione della porta di ingresso con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_input_port_slot:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_input_port_slot**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_slot>`
|
|
|
|
Restituisce l'indice di slot corrispondente della porta di ingresso con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_input_port_type:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_input_port_type**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_type>`
|
|
|
|
Restituisce il tipo di porta di ingresso con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_output_port_color:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Color<class_Color>` **get_output_port_color**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_color>`
|
|
|
|
Restituisce il :ref:`Color<class_Color>` della porta di uscita con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_output_port_count:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_output_port_count**\ (\ ) :ref:`🔗<class_GraphNode_method_get_output_port_count>`
|
|
|
|
Restituisce il numero di slot con una porta di uscita abilitata.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_output_port_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector2<class_Vector2>` **get_output_port_position**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_position>`
|
|
|
|
Restituisce la posizione della porta di uscita con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_output_port_slot:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_output_port_slot**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_slot>`
|
|
|
|
Restituisce l'indice di slot corrispondente della porta di uscita con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_output_port_type:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_output_port_type**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_type>`
|
|
|
|
Restituisce il tipo della porta di uscita con l'indice ``port_idx`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_color_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Color<class_Color>` **get_slot_color_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_color_left>`
|
|
|
|
Restituisce il colore a sinistra (ingresso) dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_color_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Color<class_Color>` **get_slot_color_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_color_right>`
|
|
|
|
Restituisce il colore a destra (uscita) dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_custom_icon_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **get_slot_custom_icon_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_custom_icon_left>`
|
|
|
|
Restituisce la :ref:`Texture2D<class_Texture2D>` personalizzata a sinistra (ingresso) dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_custom_icon_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **get_slot_custom_icon_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_custom_icon_right>`
|
|
|
|
Restituisce la :ref:`Texture2D<class_Texture2D>` personalizzata a destra (uscita) dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_metadata_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Variant<class_Variant>` **get_slot_metadata_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_metadata_left>`
|
|
|
|
Returns the left (input) metadata of the slot with the given ``slot_index``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_metadata_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Variant<class_Variant>` **get_slot_metadata_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_metadata_right>`
|
|
|
|
Returns the right (output) metadata of the slot with the given ``slot_index``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_type_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_slot_type_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_type_left>`
|
|
|
|
Restituisce il tipo a sinistra (ingresso) dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_slot_type_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_slot_type_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_type_right>`
|
|
|
|
Restituisce il tipo a sinistra (uscita) dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_get_titlebar_hbox:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`HBoxContainer<class_HBoxContainer>` **get_titlebar_hbox**\ (\ ) :ref:`🔗<class_GraphNode_method_get_titlebar_hbox>`
|
|
|
|
Restituisce il :ref:`HBoxContainer<class_HBoxContainer>` utilizzato per la barra del titolo, contenente solo una :ref:`Label<class_Label>` per visualizzare il titolo come predefinito. Può essere utilizzato per aggiungere controlli personalizzati alla barra del titolo, come pulsanti di opzioni o di chiusura.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_is_slot_draw_stylebox:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_slot_draw_stylebox**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_is_slot_draw_stylebox>`
|
|
|
|
Restituisce ``true`` se la :ref:`StyleBox<class_StyleBox>` di sfondo dello slot con l'indice ``slot_index`` è disegnata.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_is_slot_enabled_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_slot_enabled_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_is_slot_enabled_left>`
|
|
|
|
Restituisce ``true`` se il lato a sinistra (ingresso) dello slot con l'indice ``slot_index`` specificato è abilitato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_is_slot_enabled_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_slot_enabled_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_is_slot_enabled_right>`
|
|
|
|
Restituisce ``true`` se il lato a destra (uscita) dello slot con l'indice ``slot_index`` specificato è abilitato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot**\ (\ slot_index\: :ref:`int<class_int>`, enable_left_port\: :ref:`bool<class_bool>`, type_left\: :ref:`int<class_int>`, color_left\: :ref:`Color<class_Color>`, enable_right_port\: :ref:`bool<class_bool>`, type_right\: :ref:`int<class_int>`, color_right\: :ref:`Color<class_Color>`, custom_icon_left\: :ref:`Texture2D<class_Texture2D>` = null, custom_icon_right\: :ref:`Texture2D<class_Texture2D>` = null, draw_stylebox\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_GraphNode_method_set_slot>`
|
|
|
|
Imposta le proprietà dello slot con l'indice ``slot_index``.
|
|
|
|
Se ``enable_left_port``/``enable_right_port`` è ``true``, apparirà una porta e lo slot si potrà collegare da questo lato.
|
|
|
|
Con ``type_left``/``type_right`` è possibile assegnare un tipo arbitrario a ciascuna porta. È possibile collegare due porte se condividono lo stesso tipo o se il collegamento tra i loro tipi è consentito nel :ref:`GraphEdit<class_GraphEdit>` padre (vedi :ref:`GraphEdit.add_valid_connection_type()<class_GraphEdit_method_add_valid_connection_type>`). Tieni presente che il :ref:`GraphEdit<class_GraphEdit>` ha l'ultima parola nell'accettare il collegamento. La compatibilità di tipo consente semplicemente l'emissione del segnale :ref:`GraphEdit.connection_request<class_GraphEdit_signal_connection_request>`.
|
|
|
|
È possibile personalizzare ulteriolmente le porte attraverso ``color_left``/``color_right`` e ``custom_icon_left``/``custom_icon_right``. Il parametro color aggiunge una tinta all'icona. L'icona personalizzata si può utilizzare per sovrascrivere il punto predefinito della porta.
|
|
|
|
Inoltre, ``draw_stylebox`` si può utilizzare per abilitare o disabilitare il disegno dello stylebox di sfondo per ogni slot. Vedi :ref:`slot<class_GraphNode_theme_style_slot>`.
|
|
|
|
Le singole proprietà si possono anche impostare attraverso uno dei metodi ``set_slot_*``.
|
|
|
|
\ **Nota:** Questo metodo imposta solo le proprietà dello slot. Per creare lo slot stesso, aggiungi un figlio derivato da :ref:`Control<class_Control>` al GraphNode.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_color_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_color_left**\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_color_left>`
|
|
|
|
Imposta il colore del lato a sinistra (ingresso) dello slot con l'indice ``slot_index`` specificato a ``color``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_color_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_color_right**\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_color_right>`
|
|
|
|
Imposta il colore del lato a destra (ingresso) dello slot con l'indice ``slot_index`` specificato a ``color``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_custom_icon_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_custom_icon_left**\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_custom_icon_left>`
|
|
|
|
Imposta la :ref:`Texture2D<class_Texture2D>` personalizzata del lato a sinistra (ingresso) dello slot con l'indice ``slot_index`` specificato a ``custom_icon``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_custom_icon_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_custom_icon_right**\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_custom_icon_right>`
|
|
|
|
Imposta la :ref:`Texture2D<class_Texture2D>` personalizzata del lato a destra (uscita) dello slot con l'indice ``slot_index`` specificato a ``custom_icon``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_draw_stylebox:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_draw_stylebox**\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_draw_stylebox>`
|
|
|
|
Commuta la :ref:`StyleBox<class_StyleBox>` dello sfondo dello slot con l'indice ``slot_index`` specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_enabled_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_enabled_left**\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_enabled_left>`
|
|
|
|
Commuta il lato sinistro (ingresso) dello slot con l'indice ``slot_index`` specificato. Se ``enable`` è ``true``, apparirà una porta sul lato sinistro e lo slot potrà essere collegato da questo lato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_enabled_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_enabled_right**\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_enabled_right>`
|
|
|
|
Commuta il lato destro (uscita) dello slot con l'indice ``slot_index`` specificato. Se ``enable`` è ``true``, apparirà una porta sul lato destro e lo slot potrà essere collegato da questo lato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_metadata_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_metadata_left**\ (\ slot_index\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_metadata_left>`
|
|
|
|
Sets the custom metadata for the left (input) side of the slot with the given ``slot_index`` to ``value``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_metadata_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_metadata_right**\ (\ slot_index\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_metadata_right>`
|
|
|
|
Sets the custom metadata for the right (output) side of the slot with the given ``slot_index`` to ``value``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_type_left:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_type_left**\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_type_left>`
|
|
|
|
Imposta il tipo a sinistra (ingresso) dello slot con l'indice ``slot_index`` su ``type``. Se il valore è negativo, non sarà consentito creare alcun collegamento tramite input dell'utente.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_method_set_slot_type_right:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_slot_type_right**\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_type_right>`
|
|
|
|
Imposta il tipo a destra (uscita) dello slot con l'indice ``slot_index`` su ``type``. Se il valore è negativo, non sarà consentito creare alcun collegamento tramite input dell'utente.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni delle proprietà del tema
|
|
------------------------------------------------------------------------
|
|
|
|
.. _class_GraphNode_theme_color_resizer_color:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Color<class_Color>` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_GraphNode_theme_color_resizer_color>`
|
|
|
|
Il colore di modulazione colore applicato all'icona di ridimensionamento.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_constant_port_h_offset:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`int<class_int>` **port_h_offset** = ``0`` :ref:`🔗<class_GraphNode_theme_constant_port_h_offset>`
|
|
|
|
Scostamento orizzontale delle porte.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_constant_separation:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`int<class_int>` **separation** = ``2`` :ref:`🔗<class_GraphNode_theme_constant_separation>`
|
|
|
|
La distanza verticale tra le porte.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_icon_port:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`Texture2D<class_Texture2D>` **port** :ref:`🔗<class_GraphNode_theme_icon_port>`
|
|
|
|
L'icona utilizzata per rappresentare le porte.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_panel:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_GraphNode_theme_style_panel>`
|
|
|
|
Lo sfondo predefinito per l'area di slot del **GraphNode**.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_panel_focus:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **panel_focus** :ref:`🔗<class_GraphNode_theme_style_panel_focus>`
|
|
|
|
:ref:`StyleBox<class_StyleBox>` utilizzato quando il **GraphNode** è focalizzato (se utilizzato tramite applicazioni assistive).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_panel_selected:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **panel_selected** :ref:`🔗<class_GraphNode_theme_style_panel_selected>`
|
|
|
|
La :ref:`StyleBox<class_StyleBox>` utilizzata per l'area di slot quando selezionata.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_slot:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **slot** :ref:`🔗<class_GraphNode_theme_style_slot>`
|
|
|
|
La :ref:`StyleBox<class_StyleBox>` utilizzata per ogni slot del **GraphNode**.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_slot_selected:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **slot_selected** :ref:`🔗<class_GraphNode_theme_style_slot_selected>`
|
|
|
|
:ref:`StyleBox<class_StyleBox>` utilizzato quando lo slot è focalizzato (se utilizzato tramite applicazioni assistive).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_titlebar:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **titlebar** :ref:`🔗<class_GraphNode_theme_style_titlebar>`
|
|
|
|
La :ref:`StyleBox<class_StyleBox>` utilizzata per la barra del titolo del **GraphNode**.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GraphNode_theme_style_titlebar_selected:
|
|
|
|
.. rst-class:: classref-themeproperty
|
|
|
|
:ref:`StyleBox<class_StyleBox>` **titlebar_selected** :ref:`🔗<class_GraphNode_theme_style_titlebar_selected>`
|
|
|
|
La :ref:`StyleBox<class_StyleBox>` utilizzata per la barra del titolo del **GraphNode** quando è selezionato.
|
|
|
|
.. |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.)`
|