12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Theme.xml.
- .. _class_Theme:
- Theme
- =====
- **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- A resource used for styling/skinning :ref:`Control<class_Control>`\ s and :ref:`Window<class_Window>`\ s.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- A resource used for styling/skinning :ref:`Control<class_Control>` and :ref:`Window<class_Window>` nodes. While individual controls can be styled using their local theme overrides (see :ref:`Control.add_theme_color_override<class_Control_method_add_theme_color_override>`), theme resources allow you to store and apply the same settings across all controls sharing the same type (e.g. style all :ref:`Button<class_Button>`\ s the same). One theme resource can be used for the entire project, but you can also set a separate theme resource to a branch of control nodes. A theme resource assigned to a control applies to the control itself, as well as all of its direct and indirect children (as long as a chain of controls is uninterrupted).
- Use :ref:`ProjectSettings.gui/theme/custom<class_ProjectSettings_property_gui/theme/custom>` to set up a project-scope theme that will be available to every control in your project.
- Use :ref:`Control.theme<class_Control_property_theme>` of any control node to set up a theme that will be available to that control and all of its direct and indirect children.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`GUI skinning <../tutorials/ui/gui_skinning>`
- - :doc:`Using the theme editor <../tutorials/ui/gui_using_theme_editor>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. 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
- Methods
- -------
- .. 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:`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
- Enumerations
- ------------
- .. _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``
- Theme's :ref:`Color<class_Color>` item type.
- .. _class_Theme_constant_DATA_TYPE_CONSTANT:
- .. rst-class:: classref-enumeration-constant
- :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_CONSTANT** = ``1``
- Theme's constant item type.
- .. _class_Theme_constant_DATA_TYPE_FONT:
- .. rst-class:: classref-enumeration-constant
- :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_FONT** = ``2``
- Theme's :ref:`Font<class_Font>` item type.
- .. _class_Theme_constant_DATA_TYPE_FONT_SIZE:
- .. rst-class:: classref-enumeration-constant
- :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_FONT_SIZE** = ``3``
- Theme's font size item type.
- .. _class_Theme_constant_DATA_TYPE_ICON:
- .. rst-class:: classref-enumeration-constant
- :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_ICON** = ``4``
- Theme's icon :ref:`Texture2D<class_Texture2D>` item type.
- .. _class_Theme_constant_DATA_TYPE_STYLEBOX:
- .. rst-class:: classref-enumeration-constant
- :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_STYLEBOX** = ``5``
- Theme's :ref:`StyleBox<class_StyleBox>` item type.
- .. _class_Theme_constant_DATA_TYPE_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`DataType<enum_Theme_DataType>` **DATA_TYPE_MAX** = ``6``
- Maximum value for the DataType enum.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _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**\ (\ )
- The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to ``0.0``, the global scale factor is used (see :ref:`ThemeDB.fallback_base_scale<class_ThemeDB_property_fallback_base_scale>`).
- Use :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>` to check if this value is valid.
- .. 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**\ (\ )
- The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font<class_ThemeDB_property_fallback_font>`).
- Use :ref:`has_default_font<class_Theme_method_has_default_font>` to check if this value is valid.
- .. 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**\ (\ )
- The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font_size<class_ThemeDB_property_fallback_font_size>`).
- Values below ``1`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size<class_Theme_method_has_default_font_size>` to check if this value is valid.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_Theme_method_add_type:
- .. rst-class:: classref-method
- |void| **add_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`๐<class_Theme_method_add_type>`
- Adds an empty theme type for every valid data type.
- \ **Note:** Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available ``set_*`` methods to add theme items.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Theme_method_clear:
- .. rst-class:: classref-method
- |void| **clear**\ (\ ) :ref:`๐<class_Theme_method_clear>`
- Removes all the theme properties defined on the theme resource.
- .. 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>`
- Removes the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_color<class_Theme_method_has_color>` to check for existence.
- .. 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>`
- Removes the constant property defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_constant<class_Theme_method_has_constant>` to check for existence.
- .. 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>`
- Removes the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_font<class_Theme_method_has_font>` to check for existence.
- .. 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>`
- Removes the font size property defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_font_size<class_Theme_method_has_font_size>` to check for existence.
- .. 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>`
- Removes the icon property defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_icon<class_Theme_method_has_icon>` to check for existence.
- .. 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>`
- Removes the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_stylebox<class_Theme_method_has_stylebox>` to check for existence.
- .. 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>`
- Removes the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists.
- Fails if it doesn't exist. Use :ref:`has_theme_item<class_Theme_method_has_theme_item>` to check for existence.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Unmarks ``theme_type`` as being a variation of another theme type. See :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>`
- Returns the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``, if it exists.
- Returns the default color value if the property doesn't exist. Use :ref:`has_color<class_Theme_method_has_color>` to check for existence.
- .. 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>`
- Returns a list of names for :ref:`Color<class_Color>` properties defined with ``theme_type``. Use :ref:`get_color_type_list<class_Theme_method_get_color_type_list>` to get a list of possible theme type names.
- .. 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>`
- Returns a list of all unique theme type names for :ref:`Color<class_Color>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- .. 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>`
- Returns the constant property defined by ``name`` and ``theme_type``, if it exists.
- Returns ``0`` if the property doesn't exist. Use :ref:`has_constant<class_Theme_method_has_constant>` to check for existence.
- .. 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>`
- Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>` to get a list of possible theme type names.
- .. 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>`
- Returns a list of all unique theme type names for constant properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- .. 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>`
- Returns the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``, if it exists.
- Returns the default theme font if the property doesn't exist and the default theme font is set up (see :ref:`default_font<class_Theme_property_default_font>`). Use :ref:`has_font<class_Theme_method_has_font>` to check for existence of the property and :ref:`has_default_font<class_Theme_method_has_default_font>` to check for existence of the default theme font.
- Returns the engine fallback font value, if neither exist (see :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>`
- Returns a list of names for :ref:`Font<class_Font>` properties defined with ``theme_type``. Use :ref:`get_font_type_list<class_Theme_method_get_font_type_list>` to get a list of possible theme type names.
- .. 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>`
- Returns the font size property defined by ``name`` and ``theme_type``, if it exists.
- Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see :ref:`default_font_size<class_Theme_property_default_font_size>`). Use :ref:`has_font_size<class_Theme_method_has_font_size>` to check for existence of the property and :ref:`has_default_font_size<class_Theme_method_has_default_font_size>` to check for existence of the default theme font.
- Returns the engine fallback font size value, if neither exist (see :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>`
- Returns a list of names for font size properties defined with ``theme_type``. Use :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>` to get a list of possible theme type names.
- .. 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>`
- Returns a list of all unique theme type names for font size properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- .. 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>`
- Returns a list of all unique theme type names for :ref:`Font<class_Font>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- .. 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>`
- Returns the icon property defined by ``name`` and ``theme_type``, if it exists.
- Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB.fallback_icon<class_ThemeDB_property_fallback_icon>`). Use :ref:`has_icon<class_Theme_method_has_icon>` to check for existence.
- .. 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>`
- Returns a list of names for icon properties defined with ``theme_type``. Use :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>` to get a list of possible theme type names.
- .. 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>`
- Returns a list of all unique theme type names for icon properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- .. 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>`
- Returns the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``, if it exists.
- Returns the engine fallback stylebox value if the property doesn't exist (see :ref:`ThemeDB.fallback_stylebox<class_ThemeDB_property_fallback_stylebox>`). Use :ref:`has_stylebox<class_Theme_method_has_stylebox>` to check for existence.
- .. 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>`
- Returns a list of names for :ref:`StyleBox<class_StyleBox>` properties defined with ``theme_type``. Use :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>` to get a list of possible theme type names.
- .. 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>`
- Returns a list of all unique theme type names for :ref:`StyleBox<class_StyleBox>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- .. 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>`
- Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists.
- Returns the engine fallback value if the property doesn't exist (see :ref:`ThemeDB<class_ThemeDB>`). Use :ref:`has_theme_item<class_Theme_method_has_theme_item>` to check for existence.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Returns a list of names for properties of ``data_type`` defined with ``theme_type``. Use :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>` to get a list of possible theme type names.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Returns a list of all unique theme type names for ``data_type`` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Returns a list of all unique theme type names. Use the appropriate ``get_*_type_list`` method to get a list of unique theme types for a single data type.
- .. 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>`
- Returns the name of the base theme type if ``theme_type`` is a valid variation type. Returns an empty string otherwise.
- .. 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>`
- Returns a list of all type variations for the given ``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>`
- Returns ``true`` if the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type`` exists.
- Returns ``false`` if it doesn't exist. Use :ref:`set_color<class_Theme_method_set_color>` to define it.
- .. 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>`
- Returns ``true`` if the constant property defined by ``name`` and ``theme_type`` exists.
- Returns ``false`` if it doesn't exist. Use :ref:`set_constant<class_Theme_method_set_constant>` to define it.
- .. 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>`
- Returns ``true`` if :ref:`default_base_scale<class_Theme_property_default_base_scale>` has a valid value.
- Returns ``false`` if it doesn't. The value must be greater than ``0.0`` to be considered valid.
- .. 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>`
- Returns ``true`` if :ref:`default_font<class_Theme_property_default_font>` has a valid value.
- Returns ``false`` if it doesn't.
- .. 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>`
- Returns ``true`` if :ref:`default_font_size<class_Theme_property_default_font_size>` has a valid value.
- Returns ``false`` if it doesn't. The value must be greater than ``0`` to be considered valid.
- .. 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>`
- Returns ``true`` if the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type`` exists, or if the default theme font is set up (see :ref:`has_default_font<class_Theme_method_has_default_font>`).
- Returns ``false`` if neither exist. Use :ref:`set_font<class_Theme_method_set_font>` to define the property.
- .. 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>`
- Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size<class_Theme_method_has_default_font_size>`).
- Returns ``false`` if neither exist. Use :ref:`set_font_size<class_Theme_method_set_font_size>` to define the property.
- .. 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>`
- Returns ``true`` if the icon property defined by ``name`` and ``theme_type`` exists.
- Returns ``false`` if it doesn't exist. Use :ref:`set_icon<class_Theme_method_set_icon>` to define it.
- .. 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>`
- Returns ``true`` if the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type`` exists.
- Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox<class_Theme_method_set_stylebox>` to define it.
- .. 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>`
- Returns ``true`` if the theme property of ``data_type`` defined by ``name`` and ``theme_type`` exists.
- Returns ``false`` if it doesn't exist. Use :ref:`set_theme_item<class_Theme_method_set_theme_item>` to define it.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Returns ``true`` if ``theme_type`` is marked as a variation of ``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>`
- Adds missing and overrides existing definitions with values from the ``other`` theme resource.
- \ **Note:** This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.
- .. 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>`
- Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.
- .. 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>`
- Renames the :ref:`Color<class_Color>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_color<class_Theme_method_has_color>` to check for existence, and :ref:`clear_color<class_Theme_method_clear_color>` to remove the existing property.
- .. 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>`
- Renames the constant property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_constant<class_Theme_method_has_constant>` to check for existence, and :ref:`clear_constant<class_Theme_method_clear_constant>` to remove the existing property.
- .. 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>`
- Renames the :ref:`Font<class_Font>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font<class_Theme_method_has_font>` to check for existence, and :ref:`clear_font<class_Theme_method_clear_font>` to remove the existing property.
- .. 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>`
- Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size<class_Theme_method_has_font_size>` to check for existence, and :ref:`clear_font_size<class_Theme_method_clear_font_size>` to remove the existing property.
- .. 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>`
- Renames the icon property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_icon<class_Theme_method_has_icon>` to check for existence, and :ref:`clear_icon<class_Theme_method_clear_icon>` to remove the existing property.
- .. 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>`
- Renames the :ref:`StyleBox<class_StyleBox>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_stylebox<class_Theme_method_has_stylebox>` to check for existence, and :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` to remove the existing property.
- .. 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>`
- Renames the theme property of ``data_type`` defined by ``old_name`` and ``theme_type`` to ``name``, if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_theme_item<class_Theme_method_has_theme_item>` to check for existence, and :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` to remove the existing property.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Creates or changes the value of the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_color<class_Theme_method_clear_color>` to remove the property.
- .. 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>`
- Creates or changes the value of the constant property defined by ``name`` and ``theme_type``. Use :ref:`clear_constant<class_Theme_method_clear_constant>` to remove the property.
- .. 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>`
- Creates or changes the value of the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_font<class_Theme_method_clear_font>` to remove the property.
- .. 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>`
- Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size<class_Theme_method_clear_font_size>` to remove the property.
- .. 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>`
- Creates or changes the value of the icon property defined by ``name`` and ``theme_type``. Use :ref:`clear_icon<class_Theme_method_clear_icon>` to remove the property.
- .. 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>`
- Creates or changes the value of the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` to remove the property.
- .. 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>`
- Creates or changes the value of the theme property of ``data_type`` defined by ``name`` and ``theme_type``. Use :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` to remove the property.
- Fails if the ``value`` type is not accepted by ``data_type``.
- \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
- .. 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>`
- Marks ``theme_type`` as a variation of ``base_type``.
- This adds ``theme_type`` as a suggested option for :ref:`Control.theme_type_variation<class_Control_property_theme_type_variation>` on a :ref:`Control<class_Control>` that is of the ``base_type`` class.
- Variations can also be nested, i.e. ``base_type`` can be another variation. If a chain of variations ends with a ``base_type`` matching the class of the :ref:`Control<class_Control>`, the whole chain is going to be suggested as options.
- \ **Note:** Suggestions only show up if this theme resource is set as the project default theme. See :ref:`ProjectSettings.gui/theme/custom<class_ProjectSettings_property_gui/theme/custom>`.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|