mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Add property overview and setter/getter like in editor docs
Output from godotengine/godot#22013. Fixes #1729.
This commit is contained in:
@@ -8,6 +8,7 @@ Theme
|
||||
=====
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Category:** Core
|
||||
|
||||
Brief Description
|
||||
@@ -15,6 +16,13 @@ Brief Description
|
||||
|
||||
Theme for controls.
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
+-------------------------+-----------------------------------------------+
|
||||
| :ref:`Font<class_Font>` | :ref:`default_font<class_Theme_default_font>` |
|
||||
+-------------------------+-----------------------------------------------+
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
@@ -88,121 +96,128 @@ Property Descriptions
|
||||
|
||||
.. _class_Theme_default_font:
|
||||
|
||||
- :ref:`Font<class_Font>` **default_font** - The theme's default font.
|
||||
- :ref:`Font<class_Font>` **default_font**
|
||||
|
||||
+----------+-------------------------+
|
||||
| *Setter* | set_default_font(value) |
|
||||
+----------+-------------------------+
|
||||
| *Getter* | get_default_font() |
|
||||
+----------+-------------------------+
|
||||
|
||||
The theme's default font.
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_Theme_clear_color:
|
||||
.. _class_Theme_clear_color:
|
||||
|
||||
- void **clear_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)**
|
||||
|
||||
Clears theme :ref:`Color<class_Color>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_clear_constant:
|
||||
.. _class_Theme_clear_constant:
|
||||
|
||||
- void **clear_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)**
|
||||
|
||||
Clears theme constant at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_clear_font:
|
||||
.. _class_Theme_clear_font:
|
||||
|
||||
- void **clear_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)**
|
||||
|
||||
Clears :ref:`Font<class_Font>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_clear_icon:
|
||||
.. _class_Theme_clear_icon:
|
||||
|
||||
- void **clear_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)**
|
||||
|
||||
Clears icon at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_clear_stylebox:
|
||||
.. _class_Theme_clear_stylebox:
|
||||
|
||||
- void **clear_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)**
|
||||
|
||||
Clears :ref:`StyleBox<class_StyleBox>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_copy_default_theme:
|
||||
.. _class_Theme_copy_default_theme:
|
||||
|
||||
- void **copy_default_theme** **(** **)**
|
||||
|
||||
Sets theme values to a copy of the default theme values.
|
||||
|
||||
.. _class_Theme_get_color:
|
||||
.. _class_Theme_get_color:
|
||||
|
||||
- :ref:`Color<class_Color>` **get_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns the :ref:`Color<class_Color>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_color_list:
|
||||
.. _class_Theme_get_color_list:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_color_list** **(** :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns all of the :ref:`Color<class_Color>`\ s as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`Color<class_Color>`'s name, for use in :ref:`get_color<class_Theme_get_color>`, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_constant:
|
||||
.. _class_Theme_get_constant:
|
||||
|
||||
- :ref:`int<class_int>` **get_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns the constant at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_constant_list:
|
||||
.. _class_Theme_get_constant_list:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_constant_list** **(** :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns all of the constants as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each constant's name, for use in :ref:`get_constant<class_Theme_get_constant>`, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_font:
|
||||
.. _class_Theme_get_font:
|
||||
|
||||
- :ref:`Font<class_Font>` **get_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns the :ref:`Font<class_Font>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_font_list:
|
||||
.. _class_Theme_get_font_list:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_font_list** **(** :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns all of the :ref:`Font<class_Font>`\ s as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`Font<class_Font>`'s name, for use in :ref:`get_font<class_Theme_get_font>`, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_icon:
|
||||
.. _class_Theme_get_icon:
|
||||
|
||||
- :ref:`Texture<class_Texture>` **get_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns the icon :ref:`Texture<class_Texture>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_icon_list:
|
||||
.. _class_Theme_get_icon_list:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_icon_list** **(** :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns all of the icons as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`Texture<class_Texture>`'s name, for use in :ref:`get_icon<class_Theme_get_icon>`, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_stylebox:
|
||||
.. _class_Theme_get_stylebox:
|
||||
|
||||
- :ref:`StyleBox<class_StyleBox>` **get_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns the icon :ref:`StyleBox<class_StyleBox>` at ``name`` if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_stylebox_list:
|
||||
.. _class_Theme_get_stylebox_list:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_stylebox_list** **(** :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns all of the :ref:`StyleBox<class_StyleBox>`\ s as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`StyleBox<class_StyleBox>`'s name, for use in :ref:`get_stylebox<class_Theme_get_stylebox>`, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_stylebox_types:
|
||||
.. _class_Theme_get_stylebox_types:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_stylebox_types** **(** **)** const
|
||||
|
||||
Returns all of the :ref:`StyleBox<class_StyleBox>` types as a :ref:`PoolStringArray<class_PoolStringArray>` filled with each :ref:`StyleBox<class_StyleBox>`'s type, for use in :ref:`get_stylebox<class_Theme_get_stylebox>` and/or :ref:`get_stylebox_list<class_Theme_get_stylebox_list>`, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_get_type_list:
|
||||
.. _class_Theme_get_type_list:
|
||||
|
||||
- :ref:`PoolStringArray<class_PoolStringArray>` **get_type_list** **(** :ref:`String<class_String>` type **)** const
|
||||
|
||||
Returns all of the types in ``type`` as a :ref:`PoolStringArray<class_PoolStringArray>` for use in any of the get\_\* functions, if Theme has ``type``.
|
||||
|
||||
.. _class_Theme_has_color:
|
||||
.. _class_Theme_has_color:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
@@ -210,7 +225,7 @@ Returns ``true`` if :ref:`Color<class_Color>` with ``name`` is in ``type``.
|
||||
|
||||
Returns ``false`` if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_has_constant:
|
||||
.. _class_Theme_has_constant:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
@@ -218,7 +233,7 @@ Returns ``true`` if constant with ``name`` is in ``type``.
|
||||
|
||||
Returns ``false`` if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_has_font:
|
||||
.. _class_Theme_has_font:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
@@ -226,7 +241,7 @@ Returns ``true`` if :ref:`Font<class_Font>` with ``name`` is in ``type``.
|
||||
|
||||
Returns ``false`` if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_has_icon:
|
||||
.. _class_Theme_has_icon:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
@@ -234,7 +249,7 @@ Returns ``true`` if icon :ref:`Texture<class_Texture>` with ``name`` is in ``typ
|
||||
|
||||
Returns ``false`` if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_has_stylebox:
|
||||
.. _class_Theme_has_stylebox:
|
||||
|
||||
- :ref:`bool<class_bool>` **has_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type **)** const
|
||||
|
||||
@@ -242,7 +257,7 @@ Returns ``true`` if :ref:`StyleBox<class_StyleBox>` with ``name`` is in ``type``
|
||||
|
||||
Returns ``false`` if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_set_color:
|
||||
.. _class_Theme_set_color:
|
||||
|
||||
- void **set_color** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type, :ref:`Color<class_Color>` color **)**
|
||||
|
||||
@@ -250,7 +265,7 @@ Sets Theme's :ref:`Color<class_Color>` to ``color`` at ``name`` in ``type``.
|
||||
|
||||
Does nothing if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_set_constant:
|
||||
.. _class_Theme_set_constant:
|
||||
|
||||
- void **set_constant** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type, :ref:`int<class_int>` constant **)**
|
||||
|
||||
@@ -258,7 +273,7 @@ Sets Theme's constant to ``constant`` at ``name`` in ``type``.
|
||||
|
||||
Does nothing if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_set_font:
|
||||
.. _class_Theme_set_font:
|
||||
|
||||
- void **set_font** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type, :ref:`Font<class_Font>` font **)**
|
||||
|
||||
@@ -266,7 +281,7 @@ Sets Theme's :ref:`Font<class_Font>` to ``font`` at ``name`` in ``type``.
|
||||
|
||||
Does nothing if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_set_icon:
|
||||
.. _class_Theme_set_icon:
|
||||
|
||||
- void **set_icon** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type, :ref:`Texture<class_Texture>` texture **)**
|
||||
|
||||
@@ -274,7 +289,7 @@ Sets Theme's icon :ref:`Texture<class_Texture>` to ``texture`` at ``name`` in ``
|
||||
|
||||
Does nothing if Theme does not have ``type``.
|
||||
|
||||
.. _class_Theme_set_stylebox:
|
||||
.. _class_Theme_set_stylebox:
|
||||
|
||||
- void **set_stylebox** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` type, :ref:`StyleBox<class_StyleBox>` texture **)**
|
||||
|
||||
@@ -282,4 +297,3 @@ Sets Theme's :ref:`StyleBox<class_StyleBox>` to ``stylebox`` at ``name`` in ``ty
|
||||
|
||||
Does nothing if Theme does not have ``type``.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user