mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
863 lines
77 KiB
ReStructuredText
863 lines
77 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_GraphNode:
|
||
|
||
GraphNode
|
||
=========
|
||
|
||
**Експериментальний:** This class may be changed or removed in future versions.
|
||
|
||
**Успадковує:** :ref:`GraphElement<class_GraphElement>` **<** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Контейнер із портами підключення, що представляє вузол у :ref:`GraphEdit<class_GraphEdit>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
**GraphNode** дозволяє створювати вузли для графіка :ref:`GraphEdit<class_GraphEdit>` із настроюваним вмістом на основі дочірніх елементів керування. **GraphNode** походить від :ref:`Container<class_Container>` і відповідає за розміщення своїх дочірніх елементів на екрані. Це працює подібно до :ref:`VBoxContainer<class_VBoxContainer>`. Діти, у свою чергу, надають **GraphNode** так звані слоти, кожен з яких може мати порт підключення з будь-якого боку.
|
||
|
||
Кожен слот **GraphNode** визначається своїм індексом і може надати вузлу до двох портів: один ліворуч і один праворуч. За домовленістю лівий порт також називають **вхідним портом**, а правий — **вихідним портом**. Кожен порт можна ввімкнути та налаштувати окремо, використовуючи різний тип і колір. Тип — це довільне значення, яке ви можете визначити, виходячи з власних міркувань. Батьківський :ref:`GraphEdit<class_GraphEdit>` отримуватиме цю інформацію під час кожного запиту на підключення та відключення.
|
||
|
||
Слоти можна налаштувати в док-станції Inspector, додавши принаймні одну дочірню :ref:`Control<class_Control>`. Властивості згруповано за індексом кожного слота в розділі «Слот».
|
||
|
||
\ **Примітка: ** Хоча GraphNode налаштовано за допомогою слотів та індексів слотів, з’єднання встановлюються між увімкненими портами. Через це :ref:`GraphEdit<class_GraphEdit>` використовує індекс порту, а не індекс слота. Ви можете використовувати :ref:`get_input_port_slot()<class_GraphNode_method_get_input_port_slot>` і :ref:`get_output_port_slot()<class_GraphNode_method_get_output_port_slot>`, щоб отримати індекс слота з індексу порту.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. 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
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. 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
|
||
|
||
Властивості теми
|
||
--------------------------------
|
||
|
||
.. 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
|
||
|
||
Сигнали
|
||
--------------
|
||
|
||
.. _class_GraphNode_signal_slot_sizes_changed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**slot_sizes_changed**\ (\ ) :ref:`🔗<class_GraphNode_signal_slot_sizes_changed>`
|
||
|
||
Видається, коли розмір будь-якого слота міг змінитися.
|
||
|
||
.. 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>`
|
||
|
||
Видається під час оновлення будь-якого слота GraphNode.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _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**\ (\ )
|
||
|
||
Якщо ``true``, ви можете підключати порти різних типів, навіть якщо підключення явно не дозволено в батьківському :ref:`GraphEdit<class_GraphEdit>`.
|
||
|
||
.. 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**\ (\ )
|
||
|
||
Визначає, як можна фокусувати слоти з’єднань.
|
||
|
||
- Якщо встановлено значення :ref:`Control.FOCUS_CLICK<class_Control_constant_FOCUS_CLICK>`, з’єднання можна створювати лише за допомогою миші.
|
||
|
||
- Якщо встановлено значення :ref:`Control.FOCUS_ALL<class_Control_constant_FOCUS_ALL>`, слоти також можна фокусувати за допомогою дій введення :ref:`ProjectSettings.input/ui_up<class_ProjectSettings_property_input/ui_up>` та :ref:`ProjectSettings.input/ui_down<class_ProjectSettings_property_input/ui_down>`, а також з’єднувати за допомогою дій введення :ref:`ProjectSettings.input/ui_left<class_ProjectSettings_property_input/ui_left>` та :ref:`ProjectSettings.input/ui_right<class_ProjectSettings_property_input/ui_right>`.
|
||
|
||
- Якщо встановлено значення :ref:`Control.FOCUS_ACCESSIBILITY<class_Control_constant_FOCUS_ACCESSIBILITY>`, дії введення слотів увімкнені лише тоді, коли активний зчитувач з екрана.
|
||
|
||
.. 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**\ (\ )
|
||
|
||
Текст, який відображається в рядку заголовка GraphNode.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _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>`
|
||
|
||
Вимикає всі слоти GraphNode. Це призведе до видалення всіх портів введення/виведення з 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>`
|
||
|
||
Вимикає слот із заданим ``slot_index``. Це видалить відповідний вхідний і вихідний порт із 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>`
|
||
|
||
Повернення :ref:`Color<class_Color>` вхідного порту з заданим ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає кількість слотів з введеним вхідним портом.
|
||
|
||
.. 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>`
|
||
|
||
Повертає позицію вхідного порту з вказаною ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повернення відповідного індексу слота вхідного порту з вказаною ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає тип вхідного порту з заданим ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повертаємо :ref:`Color<class_Color>` вихідного порту з вказаною ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає кількість слотів з ввімкненим вихідним портом.
|
||
|
||
.. 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>`
|
||
|
||
Повертає позицію вихідного порту з заданим ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повернення відповідного індексу слота з вказаною ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає тип вихідного порту з заданим ``port_idx``.
|
||
|
||
.. 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>`
|
||
|
||
Повертаємо лівий (вхідний) ``Клор`` слота з наданою ``Slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертаємо право (вихід) :ref:`Color<class_Color>` слота з вказаною ``slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає лівий (вхідний) користувальницький :ref:`Texture2D<class_Texture2D>` слота з вказаною ``Slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає право (вихід) на замовлення :ref:`Texture2D<class_Texture2D>` слота з вказаною ``Slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає лівий (вхідний) тип слота з наданою ``slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повернення правого (виходу) типу слота з наданою ``slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертає :ref:`HBoxContainer<class_HBoxContainer>`, який використовується для рядка заголовка, містить лише :ref:`Label<class_Label>` для відображення заголовка за замовчуванням. Це можна використовувати для додавання настроюваних елементів керування до рядка заголовка, наприклад кнопок опцій або закриття.
|
||
|
||
.. 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>`
|
||
|
||
Повертає ``true``, якщо намальовано фон :ref:`StyleBox<class_StyleBox>` слота з указаним ``slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертаємо ``true``, якщо зліва (вхід) сторона слота з вказаною ``Slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Повертаємо ``true``, якщо справа (вихід) сторона слота з вказаною ``слот_index``.
|
||
|
||
.. 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>`
|
||
|
||
Встановлює властивості слота з заданим ``slot_index``.
|
||
|
||
Якщо ``enable_left_port``/``enable_right_port`` має значення ``true``, з’явиться порт, і гніздо можна буде підключити з цього боку.
|
||
|
||
За допомогою ``type_left``/``type_right`` кожному порту можна призначити довільний тип. Два порти можуть бути з’єднані, якщо вони мають однаковий тип або якщо з’єднання між їхніми типами дозволено в батьківському :ref:`GraphEdit<class_GraphEdit>` (див. :ref:`GraphEdit.add_valid_connection_type()<class_GraphEdit_method_add_valid_connection_type>`). Майте на увазі, що :ref:`GraphEdit<class_GraphEdit>` має останнє слово в прийнятті підключення. Сумісність типів просто дозволяє випромінювати сигнал :ref:`GraphEdit.connection_request<class_GraphEdit_signal_connection_request>`.
|
||
|
||
Порти можна додатково налаштувати за допомогою ``color_left``/``color_right`` і ``custom_icon_left``/``custom_icon_right``. Параметр кольору додає відтінок піктограмі. Спеціальну піктограму можна використовувати для заміни крапки порту за замовчуванням.
|
||
|
||
Крім того, ``draw_stylebox`` можна використовувати, щоб увімкнути або вимкнути малювання фонового поля стилів для кожного слота. Перегляньте :ref:`slot<class_GraphNode_theme_style_slot>`.
|
||
|
||
Окремі властивості також можна встановити за допомогою одного з методів ``set_slot_*``.
|
||
|
||
\ **Примітка:** Цей метод встановлює лише властивості слота. Щоб створити сам слот, додайте дочірній елемент :ref:`Control<class_Control>` до 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>`
|
||
|
||
Налаштовує :ref:`Color<class_Color>` лівої (вступної) сторони слота з вказаною ``slot_index`` на ``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>`
|
||
|
||
Налаштовує :ref:`Color<class_Color>` правої (виходу) сторони слота з наданою ``slot_index`` на ``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>`
|
||
|
||
Налаштовує користувальницьких :ref:`Texture2D<class_Texture2D>` лівої (вступної) сторони слота з вказаною ``slot_index`` на ``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>`
|
||
|
||
Налаштовує користувальницьких :ref:`Texture2D<class_Texture2D>` правої (виходової) сторони слота з вказаною ``slot_index`` на ``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>`
|
||
|
||
Переключає фон :ref:`StyleBox<class_StyleBox>` слота ``slot_index``.
|
||
|
||
.. 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>`
|
||
|
||
Перемикає ліву (вхідну) сторону слота з указаним ``slot_index``. Якщо ``enable`` має значення ``true``, порт з’явиться ліворуч, і слот можна буде підключити з цього боку.
|
||
|
||
.. 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>`
|
||
|
||
Перемикає праву (вихідну) сторону слота з указаним ``slot_index``. Якщо ``enable`` має значення ``true``, праворуч з’явиться порт, і гніздо можна буде підключити з цього боку.
|
||
|
||
.. 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>`
|
||
|
||
Встановлює лівий (вхідний) тип слота з указаним ``slot_index`` на ``type``. Якщо значення від’ємне, будь-які підключення буде заборонено створювати за допомогою введених користувачем даних.
|
||
|
||
.. 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>`
|
||
|
||
Встановлює правильний (вихідний) тип слота з указаним ``slot_index`` на ``type``. Якщо значення від’ємне, будь-які підключення буде заборонено створювати за допомогою введених користувачем даних.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи тематичної нерухомості
|
||
--------------------------------------------------------
|
||
|
||
.. _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>`
|
||
|
||
Модуляція кольору, застосована до піктограми зміни розміру.
|
||
|
||
.. 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>`
|
||
|
||
Горизонтальне зміщення для портів.
|
||
|
||
.. 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>`
|
||
|
||
Вертикальна відстань між портами.
|
||
|
||
.. 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>`
|
||
|
||
Значок, який використовується для представлення портів.
|
||
|
||
.. 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>`
|
||
|
||
Фон за умовчанням для області слота **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>` використовується, коли фокусовано **GraphNode** (при використанні з допоміжними програмами).
|
||
|
||
.. 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>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` використовується для зони слота під вибраним.
|
||
|
||
.. 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>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` використовується для кожного слота **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>` використовується, коли слот перебуває у фокусі (при використанні з допоміжними програмами).
|
||
|
||
.. 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>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>` використовується для рядка заголовка **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>`
|
||
|
||
:ref:`StyleBox<class_StyleBox>`, який використовується для рядка заголовка **GraphNode**, коли його вибрано.
|
||
|
||
.. |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 (Значення не повертається.)`
|