Files
godot-docs-l10n/classes/uk/class_theme.rst

1181 lines
94 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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

:github_url: hide
.. _class_Theme:
Theme
=====
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Ресурс, що використовується для укладки / skinning :ref:`Control<class_Control>`\ s і :ref:`Window<class_Window>`\ s.
.. rst-class:: classref-introduction-group
Опис
--------
Ресурс, що використовується для стилізації/скинінгу вузлів :ref:`Control<class_Control>` та :ref:`Window<class_Window>`. Хоча окремі елементи керування можна стилізувати за допомогою їхніх локальних перевизначень тем (див. :ref:`Control.add_theme_color_override()<class_Control_method_add_theme_color_override>`), ресурси тем дозволяють зберігати та застосовувати однакові налаштування до всіх елементів керування одного типу (наприклад, стилізувати всі :ref:`Button<class_Button>` однаково). Один ресурс теми можна використовувати для всього проекту, але ви також можете встановити окремий ресурс теми для гілки вузлів керування. Ресурс теми, призначений елементу керування, застосовується до самого елемента керування, а також до всіх його прямих та непрямих дочірніх елементів (за умови, що ланцюжок елементів керування не переривається).
Використовуйте :ref:`ProjectSettings.gui/theme/custom<class_ProjectSettings_property_gui/theme/custom>`, щоб налаштувати тему на рівні проекту, яка буде доступна для кожного елемента керування у вашому проекті.
Використовуйте :ref:`Control.theme<class_Control_property_theme>` будь-якого вузла керування, щоб налаштувати тему, яка буде доступна для цього елемента керування та всіх його прямих та непрямих дочірніх елементів.
.. rst-class:: classref-introduction-group
Посібники
------------------
- :doc:`Графічний інтерфейс <../tutorials/ui/gui_skinning>`
- :doc:`Використання редактора тем <../tutorials/ui/gui_using_theme_editor>`
.. rst-class:: classref-reftable-group
Властивості
----------------------
.. table::
:widths: auto
+---------------------------+--------------------------------------------------------------------+---------+
| :ref:`float<class_float>` | :ref:`default_base_scale<class_Theme_property_default_base_scale>` | ``0.0`` |
+---------------------------+--------------------------------------------------------------------+---------+
| :ref:`Font<class_Font>` | :ref:`default_font<class_Theme_property_default_font>` | |
+---------------------------+--------------------------------------------------------------------+---------+
| :ref:`int<class_int>` | :ref:`default_font_size<class_Theme_property_default_font_size>` | ``-1`` |
+---------------------------+--------------------------------------------------------------------+---------+
.. rst-class:: classref-reftable-group
Методи
------------
.. table::
:widths: auto
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_type<class_Theme_method_add_type>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear<class_Theme_method_clear>`\ (\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_color<class_Theme_method_clear_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_constant<class_Theme_method_clear_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_font<class_Theme_method_clear_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_font_size<class_Theme_method_clear_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_icon<class_Theme_method_clear_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_stylebox<class_Theme_method_clear_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_theme_item<class_Theme_method_clear_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_type_variation<class_Theme_method_clear_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_color<class_Theme_method_get_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_list<class_Theme_method_get_color_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_type_list<class_Theme_method_get_color_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_constant<class_Theme_method_get_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_list<class_Theme_method_get_constant_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Font<class_Font>` | :ref:`get_font<class_Theme_method_get_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_list<class_Theme_method_get_font_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_font_size<class_Theme_method_get_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_list<class_Theme_method_get_font_size_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_type_list<class_Theme_method_get_font_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_Theme_method_get_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_list<class_Theme_method_get_icon_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`get_stylebox<class_Theme_method_get_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get_theme_item<class_Theme_method_get_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, theme_type\: :ref:`String<class_String>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_list<class_Theme_method_get_type_list>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`get_type_variation_base<class_Theme_method_get_type_variation_base>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_variation_list<class_Theme_method_get_type_variation_list>`\ (\ base_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_color<class_Theme_method_has_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_constant<class_Theme_method_has_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_default_font<class_Theme_method_has_default_font>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_default_font_size<class_Theme_method_has_default_font_size>`\ (\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_font<class_Theme_method_has_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_font_size<class_Theme_method_has_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_icon<class_Theme_method_has_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_stylebox<class_Theme_method_has_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_theme_item<class_Theme_method_has_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_type_variation<class_Theme_method_is_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |const| |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`merge_with<class_Theme_method_merge_with>`\ (\ other\: :ref:`Theme<class_Theme>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_type<class_Theme_method_remove_type>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_color<class_Theme_method_rename_color>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_constant<class_Theme_method_rename_constant>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_font<class_Theme_method_rename_font>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_font_size<class_Theme_method_rename_font_size>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_icon<class_Theme_method_rename_icon>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_stylebox<class_Theme_method_rename_stylebox>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_theme_item<class_Theme_method_rename_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_type<class_Theme_method_rename_type>`\ (\ old_theme_type\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_color<class_Theme_method_set_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_constant<class_Theme_method_set_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_font<class_Theme_method_set_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_font_size<class_Theme_method_set_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_icon<class_Theme_method_set_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_stylebox<class_Theme_method_set_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`StyleBox<class_StyleBox>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_theme_item<class_Theme_method_set_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_type_variation<class_Theme_method_set_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |
+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Переліки
----------------
.. _enum_Theme_DataType:
.. rst-class:: classref-enumeration
enum **DataType**: :ref:`🔗<enum_Theme_DataType>`
.. _class_Theme_constant_DATA_TYPE_COLOR:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_COLOR** = ``0``
Теми :ref:`Color<class_Color>` Тип елемента.
.. _class_Theme_constant_DATA_TYPE_CONSTANT:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_CONSTANT** = ``1``
Тип постійного елемента теми.
.. _class_Theme_constant_DATA_TYPE_FONT:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_FONT** = ``2``
Теми :ref:`Font<class_Font>` тип елемента.
.. _class_Theme_constant_DATA_TYPE_FONT_SIZE:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_FONT_SIZE** = ``3``
Тип елемента шрифту Теми.
.. _class_Theme_constant_DATA_TYPE_ICON:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_ICON** = ``4``
Теми ікони :ref:`Texture2D<class_Texture2D>` Тип елемента.
.. _class_Theme_constant_DATA_TYPE_STYLEBOX:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_STYLEBOX** = ``5``
Теми :ref:`StyleBox<class_StyleBox>` Тип елемента.
.. _class_Theme_constant_DATA_TYPE_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_MAX** = ``6``
Максимальне значення для кодування даних.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи властивостей
------------------------------------
.. _class_Theme_property_default_base_scale:
.. rst-class:: classref-property
:ref:`float<class_float>` **default_base_scale** = ``0.0`` :ref:`🔗<class_Theme_property_default_base_scale>`
.. rst-class:: classref-property-setget
- |void| **set_default_base_scale**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_default_base_scale**\ (\ )
За замовчуванням базовий ваговий фактор цього тематичного ресурсу. Використовуються деякими контрольними засобами для масштабування своїх візуальних властивостей на основі глобального фактора масштабу. Якщо це значення встановлено до ``0.0``, використовується глобальний фактор масштабу (див. :ref:`ThemeDB.fallback_base_scale<class_ThemeDB_property_fallback_base_scale>`).
Використовуйте :ref:`has_default_base_scale()<class_Theme_method_has_default_base_scale>` для перевірки, якщо це значення діє.
.. rst-class:: classref-item-separator
----
.. _class_Theme_property_default_font:
.. rst-class:: classref-property
:ref:`Font<class_Font>` **default_font** :ref:`🔗<class_Theme_property_default_font>`
.. rst-class:: classref-property-setget
- |void| **set_default_font**\ (\ value\: :ref:`Font<class_Font>`\ )
- :ref:`Font<class_Font>` **get_default_font**\ (\ )
Типовий шрифт цього тематичного ресурсу. Використовуються як значення за замовчуванням при спробі викопувати шрифтовий ресурс, який не існує в цій темі або є в недійсному стані. Якщо тип за замовчуванням також відсутній або невірний, використовується значення повернення двигуна (див. ``email protected``.
Використовуйте :ref:`has_default_font()<class_Theme_method_has_default_font>` для перевірки, якщо це значення є дійсним.
.. rst-class:: classref-item-separator
----
.. _class_Theme_property_default_font_size:
.. rst-class:: classref-property
:ref:`int<class_int>` **default_font_size** = ``-1`` :ref:`🔗<class_Theme_property_default_font_size>`
.. rst-class:: classref-property-setget
- |void| **set_default_font_size**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_default_font_size**\ (\ )
Розмір шрифту за замовчуванням цього тематичного ресурсу. Використовуються як значення за замовчуванням при спробі викопувати значення шрифту, яка не існує в цій темі або є в недійсному стані. Якщо розмір шрифту за замовчуванням також відсутній або невірний, використовується значення повернення двигуна (див. :ref:`ThemeDB.fallback_font_size<class_ThemeDB_property_fallback_font_size>`).
Ціни нижче ``1`` недійсними і можуть використовуватися для невизначення майна. Використовуйте :ref:`has_default_font_size()<class_Theme_method_has_default_font_size>` для перевірки, якщо це значення діє.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи методів
--------------------------
.. _class_Theme_method_add_type:
.. rst-class:: classref-method
|void| **add_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_add_type>`
Додайте порожній тип теми для кожного дійсного типу даних.
\ **Примітка:** Типи Empty не зберігаються з темою. Цей метод існує лише для виконання безсмертних змін до ресурсу. Використовуйте доступні ``set_*`` методи додавання елементів теми.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear:
.. rst-class:: classref-method
|void| **clear**\ (\ ) :ref:`🔗<class_Theme_method_clear>`
Видаліть всі тематичні властивості, визначені на тематичному ресурсі.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_color:
.. rst-class:: classref-method
|void| **clear_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_color>`
Видаляє властивість :ref:`Color<class_Color>`, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Не вдається виконати дію, якщо вона не існує. Використовуйте метод :ref:`has_color()<class_Theme_method_has_color>` для перевірки її існування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_constant:
.. rst-class:: classref-method
|void| **clear_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_constant>`
Видаляє константну властивість, визначену ``name`` та ``theme_type``, якщо вона існує.
Не вдається, якщо вона не існує. Використовуйте :ref:`has_constant()<class_Theme_method_has_constant>` для перевірки її існування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_font:
.. rst-class:: classref-method
|void| **clear_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_font>`
Видаляє властивість :ref:`Font<class_Font>`, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Не вдається виконати перевірку, якщо вона не існує. Використовуйте метод :ref:`has_font()<class_Theme_method_has_font>` для перевірки її існування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_font_size:
.. rst-class:: classref-method
|void| **clear_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_font_size>`
Видаляє властивість розміру шрифту, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Не вдається виконати перевірку, якщо вона не існує. Використовуйте метод :ref:`has_font_size()<class_Theme_method_has_font_size>` для перевірки наявності.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_icon:
.. rst-class:: classref-method
|void| **clear_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_icon>`
Видаляє властивість icon, визначену за допомогою ``name`` та ``theme_type``, якщо вона існує.
Не вдається виконати перевірку, якщо вона не існує. Використовуйте :ref:`has_icon()<class_Theme_method_has_icon>` для перевірки її існування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_stylebox:
.. rst-class:: classref-method
|void| **clear_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_stylebox>`
Видаляє властивість :ref:`StyleBox<class_StyleBox>`, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Не вдається виконати перевірку, якщо вона не існує. Використовуйте метод :ref:`has_stylebox()<class_Theme_method_has_stylebox>` для перевірки її існування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_theme_item:
.. rst-class:: classref-method
|void| **clear_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_theme_item>`
Вилучає тему ``data_type`` ``name`` і ``theme_type``, якщо він існує.
Не існує. Використовуйте :ref:`has_theme_item()<class_Theme_method_has_theme_item>` для перевірки існування.
\ **Примітка:** Цей метод є аналогом, щоб викликати конкретний метод типу даних, але можна використовувати для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_clear_type_variation:
.. rst-class:: classref-method
|void| **clear_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_type_variation>`
Знімає позначку ``theme_type`` як варіації іншого типу теми. Див. :ref:`set_type_variation()<class_Theme_method_set_type_variation>`.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_color:
.. rst-class:: classref-method
:ref:`Color<class_Color>` **get_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_color>`
Повертає властивість :ref:`Color<class_Color>`, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Повертає значення кольору за замовчуванням, якщо властивість не існує. Використовуйте метод :ref:`has_color()<class_Theme_method_has_color>` для перевірки наявності.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_color_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_color_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_color_list>`
Повертає список назв для властивостей :ref:`Color<class_Color>`, визначених за допомогою ``theme_type``. Використовуйте :ref:`get_color_type_list()<class_Theme_method_get_color_type_list>` для отримання списку можливих назв типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_color_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_color_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_color_type_list>`
Повертає список всіх унікальних назв тематичних типів :ref:`Color<class_Color>`. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_constant:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_constant>`
Повертає константну властивість, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Повертає ``0``, якщо властивість не існує. Використовуйте :ref:`has_constant()<class_Theme_method_has_constant>` для перевірки її існування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_constant_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_constant_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_constant_list>`
Повертає список імен для постійних властивостей, визначених ``theme_type``. Використовуйте :ref:`get_constant_type_list()<class_Theme_method_get_constant_type_list>`, щоб отримати список можливих назв типу теми.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_constant_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_constant_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_constant_type_list>`
Повертає список всіх унікальних назв тематичних типів для постійних властивостей. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_font:
.. rst-class:: classref-method
:ref:`Font<class_Font>` **get_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_font>`
Повернути майно :ref:`Font<class_Font>`, визначене ``name`` та ``theme_type``, якщо він існує.
Повертає шрифт теми за замовчуванням, якщо властивість не існує, а шрифт теми за замовчуванням встановлюється (див. :ref:`default_font<class_Theme_property_default_font>`). Використовуйте :ref:`has_font()<class_Theme_method_has_font>`, щоб перевірити наявність майна та :ref:`has_default_font()<class_Theme_method_has_default_font>`, щоб перевірити наявність шрифту теми за замовчуванням.
Повертає значення шрифту двигуна, якщо ні немає (див. :ref:`ThemeDB.fallback_font<class_ThemeDB_property_fallback_font>`).
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_font_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_font_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_font_list>`
Повертає список імен для властивостей :ref:`Font<class_Font>`, визначених ``theme_type``. Використовуйте :ref:`get_font_type_list()<class_Theme_method_get_font_type_list>` для отримання списку можливих назв типу теми.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_font_size:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_font_size>`
Повертає властивість розміру шрифту, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Повертає розмір шрифту теми за замовчуванням, якщо властивість не існує, а розмір шрифту теми за замовчуванням встановлено (див. :ref:`default_font_size<class_Theme_property_default_font_size>`). Використовуйте метод :ref:`has_font_size()<class_Theme_method_has_font_size>` для перевірки існування властивості та метод :ref:`has_default_font_size()<class_Theme_method_has_default_font_size>` для перевірки існування шрифту теми за замовчуванням.
Повертає значення резервного розміру шрифту движка, якщо жодного з них не існує (див. :ref:`ThemeDB.fallback_font_size<class_ThemeDB_property_fallback_font_size>`).
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_font_size_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_font_size_list>`
Повертає список імен для властивостей шрифтів, визначених ``theme_type``. Використовуйте :ref:`get_font_size_type_list()<class_Theme_method_get_font_size_type_list>`, щоб отримати список можливих назв типу теми.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_font_size_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_font_size_type_list>`
Повертає список всіх унікальних назв тем для властивостей шрифтів. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_font_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_font_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_font_type_list>`
Повертає список всіх унікальних назв тематичних типів :ref:`Font<class_Font>`. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_icon:
.. rst-class:: classref-method
:ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_icon>`
Повертає властивість значка, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Повертає значення значка резервного скрипта, якщо властивість не існує (див. :ref:`ThemeDB.fallback_icon<class_ThemeDB_property_fallback_icon>`). Використовуйте метод :ref:`has_icon()<class_Theme_method_has_icon>` для перевірки наявності.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_icon_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_icon_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_icon_list>`
Повертає список імен для іконових властивостей, визначених ``theme_type``. Використовуйте :ref:`get_icon_type_list()<class_Theme_method_get_icon_type_list>`, щоб отримати список можливих назв типу теми.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_icon_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_icon_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_icon_type_list>`
Повертає список всіх унікальних темних імен для іконних властивостей. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_stylebox:
.. rst-class:: classref-method
:ref:`StyleBox<class_StyleBox>` **get_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_stylebox>`
Повертає властивість :ref:`StyleBox<class_StyleBox>`, визначену параметрами ``name`` та ``theme_type``, якщо вона існує.
Повертає резервне значення stylebox рушія, якщо властивість не існує (див. :ref:`ThemeDB.fallback_stylebox<class_ThemeDB_property_fallback_stylebox>`). Використовуйте метод :ref:`has_stylebox()<class_Theme_method_has_stylebox>` для перевірки наявності.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_stylebox_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_stylebox_list>`
Повертає список імен для властивостей :ref:`StyleBox<class_StyleBox>`, визначених за допомогою ``theme_type``. Використовуйте :ref:`get_stylebox_type_list()<class_Theme_method_get_stylebox_type_list>`, щоб отримати список можливих назв типу теми.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_stylebox_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_stylebox_type_list>`
Повертає список всіх унікальних назв тематичних типів :ref:`StyleBox<class_StyleBox>`. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_theme_item:
.. rst-class:: classref-method
:ref:`Variant<class_Variant>` **get_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_theme_item>`
Повертає властивість теми ``data_type``, визначену ``name`` та ``theme_type``, якщо вона існує.
Повертає резервне значення движка, якщо властивість не існує (див. :ref:`ThemeDB<class_ThemeDB>`). Використовуйте :ref:`has_theme_item()<class_Theme_method_has_theme_item>` для перевірки наявності.
\ **Примітка:** Цей метод аналогічний виклику відповідного методу, специфічного для типу даних, але може бути використаний для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_theme_item_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_list**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_theme_item_list>`
Повертає список імен для властивостей ``data_type``, визначених ``theme_type``. Використовуйте :ref:`get_theme_item_type_list()<class_Theme_method_get_theme_item_type_list>` для отримання списку можливих темних імен.
\ **Примітка:** Цей метод є аналогом, щоб викликати конкретний метод типу даних, але можна використовувати для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_theme_item_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_type_list**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`\ ) |const| :ref:`🔗<class_Theme_method_get_theme_item_type_list>`
Повертає список всіх унікальних назв типів тем ``data_type``. Використовуйте :ref:`get_type_list()<class_Theme_method_get_type_list>`, щоб отримати список всіх унікальних типів тем.
\ **Примітка:** Цей метод є аналогом, щоб викликати конкретний метод типу даних, але можна використовувати для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_type_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_type_list>`
Повертає список всіх унікальних назв тем. Використовуйте відповідні ``get_*_type_list`` метод отримання списку унікальних типів тем для одного типу даних.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_type_variation_base:
.. rst-class:: classref-method
:ref:`StringName<class_StringName>` **get_type_variation_base**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_type_variation_base>`
Повертає назву базового типу теми, якщо ``theme_type`` є дійсним типом варіації. Повертає порожній рядок іншим чином.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_get_type_variation_list:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_type_variation_list**\ (\ base_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_type_variation_list>`
Повертає список усіх варіацій типу для заданого ``base_type``.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_color:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_color>`
Повертає ``true``, якщо існує властивість :ref:`Color<class_Color>`, визначена ``name`` і ``theme_type``.
Повертає ``false``, якщо його не існує. Використовуйте :ref:`set_color()<class_Theme_method_set_color>`, щоб визначити його.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_constant:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_constant>`
Повертає ``true``, якщо існує властивість константи, визначена ``name`` і ``theme_type``.
Повертає ``false``, якщо його не існує. Використовуйте :ref:`set_constant()<class_Theme_method_set_constant>`, щоб визначити його.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_default_base_scale:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_default_base_scale**\ (\ ) |const| :ref:`🔗<class_Theme_method_has_default_base_scale>`
Повертає ``true``, якщо :ref:`default_base_scale<class_Theme_property_default_base_scale>` має дійсне значення.
\ ``false`` якщо це не так. Вартість повинна бути більшою, ніж ``0.0``, щоб вважати дійсним.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_default_font:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_default_font**\ (\ ) |const| :ref:`🔗<class_Theme_method_has_default_font>`
Повертає ``true``, якщо :ref:`default_font<class_Theme_property_default_font>` має дійсне значення.
Повертає ``false``, якщо це не так.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_default_font_size:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_default_font_size**\ (\ ) |const| :ref:`🔗<class_Theme_method_has_default_font_size>`
Повертає ``true``, якщо :ref:`default_font_size<class_Theme_property_default_font_size>` має дійсне значення.
Повертає ``false``, якщо ні. Значення має бути більше ніж ``0``, щоб вважатися дійсним.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_font:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_font>`
Повертає ``true``, якщо :ref:`Font<class_Font>` майно, визначене ``name`` і ``theme_type`` існує, або якщо за замовчуванням тема шрифту встановлена (див. :ref:`has_default_font()<class_Theme_method_has_default_font>`).
Повертає ``false``, якщо ні немає. Використовуйте :ref:`set_font()<class_Theme_method_set_font>` для визначення майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_font_size:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_font_size>`
Повертає ``true``, якщо розмір шрифту, визначений назвою ``name`` і ``theme_type`` існує, або якщо типовий розмір шрифту (див. :ref:`has_default_font_size()<class_Theme_method_has_default_font_size>`.
Повертає ``false``, якщо ні немає. Використовуйте :ref:`set_font_size()<class_Theme_method_set_font_size>` для визначення майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_icon:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_icon>`
Повертає ``true``, якщо існує властивість піктограми, визначена ``name`` і ``theme_type``.
Повертає ``false``, якщо його не існує. Використовуйте :ref:`set_icon()<class_Theme_method_set_icon>`, щоб визначити його.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_stylebox:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_stylebox>`
Повертає ``true``, якщо існує властивість :ref:`StyleBox<class_StyleBox>`, визначена ``name`` і ``theme_type``.
Повертає ``false``, якщо його не існує. Використовуйте :ref:`set_stylebox()<class_Theme_method_set_stylebox>`, щоб визначити його.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_has_theme_item:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_theme_item>`
``true``, якщо існує тема ``data_type``, визначена ``name`` і ``theme_type``.
\ ``false``, якщо це не існує. Використовуйте :ref:`set_theme_item()<class_Theme_method_set_theme_item>`, щоб визначити його.
\ **Примітка:** Цей метод є аналогом, щоб викликати конкретний метод типу даних, але можна використовувати для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_is_type_variation:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_is_type_variation>`
``true`` if ``theme_type`` позначений як варіація ``base_type``.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_merge_with:
.. rst-class:: classref-method
|void| **merge_with**\ (\ other\: :ref:`Theme<class_Theme>`\ ) :ref:`🔗<class_Theme_method_merge_with>`
Додає відсутню та наділені існуючі визначення з значеннями ``other`` тематичного ресурсу.
\ **Примітка:** Цей модіфікує поточну тему. Якщо ви хочете об'єднати дві теми разом, не змінюючи один, створити нову порожню тему і об'єднати інші два в неї після іншого.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_remove_type:
.. rst-class:: classref-method
|void| **remove_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_remove_type>`
Видаліть тематичний тип, витончено відкинути визначені елементи теми. Якщо тип є варіацією, ця інформація також стирається. Якщо тип є основою для варіацій типу, ці варіації втрачають свою основу.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_color:
.. rst-class:: classref-method
|void| **rename_color**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_color>`
Перейменування майна :ref:`Color<class_Color>`, визначеного ``old_name`` та ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_color()<class_Theme_method_has_color>`, щоб перевірити наявність, і :ref:`clear_color()<class_Theme_method_clear_color>` для видалення існуючого майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_constant:
.. rst-class:: classref-method
|void| **rename_constant**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_constant>`
Перейменувати постійне майно, визначене ``old_name`` і ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_constant()<class_Theme_method_has_constant>`, щоб перевірити наявність, і :ref:`clear_constant()<class_Theme_method_clear_constant>` для видалення існуючого майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_font:
.. rst-class:: classref-method
|void| **rename_font**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_font>`
Перейменування майна :ref:`Font<class_Font>`, визначеного ``old_name`` та ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_font()<class_Theme_method_has_font>`, щоб перевірити наявність, і :ref:`clear_font()<class_Theme_method_clear_font>` для видалення існуючого майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_font_size:
.. rst-class:: classref-method
|void| **rename_font_size**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_font_size>`
Перейменування розміру шрифту, визначеного ``old_name`` та ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_font_size()<class_Theme_method_has_font_size>`, щоб перевірити наявність, і :ref:`clear_font_size()<class_Theme_method_clear_font_size>` для видалення існуючого майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_icon:
.. rst-class:: classref-method
|void| **rename_icon**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_icon>`
Перейменування ікони, визначеного ``old_name`` і ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_icon()<class_Theme_method_has_icon>`, щоб перевірити наявність, і :ref:`clear_icon()<class_Theme_method_clear_icon>` для видалення існуючого майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_stylebox:
.. rst-class:: classref-method
|void| **rename_stylebox**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_stylebox>`
Перейменування майна :ref:`StyleBox<class_StyleBox>`, визначеного ``old_name`` та ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_stylebox()<class_Theme_method_has_stylebox>`, щоб перевірити наявність, і :ref:`clear_stylebox()<class_Theme_method_clear_stylebox>` для видалення існуючого майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_theme_item:
.. rst-class:: classref-method
|void| **rename_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_theme_item>`
Перейменуйте тему ``data_type``, визначену ``old_name`` та ``theme_type`` до ``name``, якщо він існує.
Якщо це не існує, або якщо вже існує схожа власність з новою назвою. Використовуйте :ref:`has_theme_item()<class_Theme_method_has_theme_item>` для перевірки існування, а :ref:`clear_theme_item()<class_Theme_method_clear_theme_item>` для видалення існуючого майна.
\ **Примітка:** Цей метод є аналогом, щоб викликати конкретний метод типу даних, але можна використовувати для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_rename_type:
.. rst-class:: classref-method
|void| **rename_type**\ (\ old_theme_type\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_type>`
Перейменовує тип теми ``old_theme_type`` на ``theme_type``, якщо старий тип існує, а новий не існує.
\ **Примітка:** Перейменування типу теми на порожнє ім'я або варіації на тип, пов'язаний із вбудованим класом, видаляє зв'язки варіації типу таким чином, що це неможливо скасувати лише скасуванням перейменування.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_color:
.. rst-class:: classref-method
|void| **set_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Theme_method_set_color>`
Створює або змінює значення властивості :ref:`Color<class_Color>`, визначеної параметрами ``name`` та ``theme_type``. Використовуйте метод :ref:`clear_color()<class_Theme_method_clear_color>` для видалення властивості.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_constant:
.. rst-class:: classref-method
|void| **set_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Theme_method_set_constant>`
Створює або змінює значення константної властивості, визначеної параметрами ``name`` та ``theme_type``. Використовуйте метод :ref:`clear_constant()<class_Theme_method_clear_constant>` для видалення властивості.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_font:
.. rst-class:: classref-method
|void| **set_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_Theme_method_set_font>`
Створює або змінює значення об’єкта :ref:`Font<class_Font>`, визначеного ``name`` та ``theme_type``. Використовуйте :ref:`clear_font()<class_Theme_method_clear_font>` для видалення майна.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_font_size:
.. rst-class:: classref-method
|void| **set_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Theme_method_set_font_size>`
Створює або змінює значення властивості розміру шрифту, визначеної параметрами ``name`` та ``theme_type``. Використовуйте метод ``clear_font_size`` для видалення властивості.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_icon:
.. rst-class:: classref-method
|void| **set_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_Theme_method_set_icon>`
Створює або змінює значення властивості icon, визначеної параметрами ``name`` та ``theme_type``. Використовуйте метод :ref:`clear_icon()<class_Theme_method_clear_icon>` для видалення властивості.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_stylebox:
.. rst-class:: classref-method
|void| **set_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_Theme_method_set_stylebox>`
Створює або змінює значення властивості :ref:`StyleBox<class_StyleBox>`, визначеної параметрами ``name`` та ``theme_type``. Використовуйте метод :ref:`clear_stylebox()<class_Theme_method_clear_stylebox>` для видалення властивості.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_theme_item:
.. rst-class:: classref-method
|void| **set_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Theme_method_set_theme_item>`
Створює або змінює значення теми ``data_type``, визначеного ``name`` та ``theme_type``. Використовуйте :ref:`clear_theme_item()<class_Theme_method_clear_theme_item>` для видалення майна.
Якщо значення ``value`` не приймається ``data_type``.
\ **Примітка:** Цей метод є аналогом, щоб викликати конкретний метод типу даних, але можна використовувати для більш узагальненої логіки.
.. rst-class:: classref-item-separator
----
.. _class_Theme_method_set_type_variation:
.. rst-class:: classref-method
|void| **set_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_set_type_variation>`
Марки ``theme_type`` як варіація ``base_type``.
Цей додаток ``theme_type`` як запропонований варіант для :ref:`Control.theme_type_variation<class_Control_property_theme_type_variation>` на :ref:`Control<class_Control>`, який є ``base_type`` клас.
Варіанти можуть бути непристойними, тобто ``параметр base_type`` може бути інший варіант. Якщо мережа варіацій закінчується за допомогою ``base_type``, що відповідає класу :ref:`Control<class_Control>`, весь ланцюг буде запропоновано як параметри.
\ **Примітка:** Якщо цей тематичний ресурс є частиною теми за замовчуванням проекту. Див. :ref:`ProjectSettings.gui/theme/custom<class_ProjectSettings_property_gui/theme/custom>`.
.. |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 (Значення не повертається.)`