summaryrefslogtreecommitdiff
path: root/doc/classes/ThemeDB.xml
blob: 6003ffb28e73c7c09cf811e18031d362211bdea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ThemeDB" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		An engine singleton providing access to static [Theme] information, such as default and project theme, and fallback values.
	</brief_description>
	<description>
		This engine singleton provides access to static information about [Theme] resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme.
		[ThemeDB] also contains fallback values for theme properties.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="get_default_theme">
			<return type="Theme" />
			<description>
				Returns a reference to the default engine [Theme]. This theme resource is responsible for the out-of-the-box look of [Control] nodes and cannot be overridden.
			</description>
		</method>
		<method name="get_project_theme">
			<return type="Theme" />
			<description>
				Returns a reference to the custom project [Theme]. This theme resources allows to override the default engine theme for every control node in the project.
				To set the project theme, see [member ProjectSettings.gui/theme/custom].
			</description>
		</method>
	</methods>
	<members>
		<member name="fallback_base_scale" type="float" setter="set_fallback_base_scale" getter="get_fallback_base_scale" default="1.0">
			The fallback base scale factor of every [Control] node and [Theme] resource. Used when no other value is available to the control.
			See also [member Theme.default_base_scale].
		</member>
		<member name="fallback_font" type="Font" setter="set_fallback_font" getter="get_fallback_font">
			The fallback font of every [Control] node and [Theme] resource. Used when no other value is available to the control.
			See also [member Theme.default_font].
		</member>
		<member name="fallback_font_size" type="int" setter="set_fallback_font_size" getter="get_fallback_font_size" default="16">
			The fallback font size of every [Control] node and [Theme] resource. Used when no other value is available to the control.
			See also [member Theme.default_font_size].
		</member>
		<member name="fallback_icon" type="Texture2D" setter="set_fallback_icon" getter="get_fallback_icon">
			The fallback icon of every [Control] node and [Theme] resource. Used when no other value is available to the control.
		</member>
		<member name="fallback_stylebox" type="StyleBox" setter="set_fallback_stylebox" getter="get_fallback_stylebox">
			The fallback stylebox of every [Control] node and [Theme] resource. Used when no other value is available to the control.
		</member>
	</members>
	<signals>
		<signal name="fallback_changed">
			<description>
				Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items.
			</description>
		</signal>
	</signals>
</class>