Skip to content
0.2.0-dev Download ZIP
57 lines ·3.2 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="ThemeDB" inherits="Object" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A singleton that provides access to static information about [Theme] resources used by the engine and by your project.
5 </brief_description>
6 <description>
7 This 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.
8 [ThemeDB] also contains fallback values for theme properties.
9 </description>
10 <tutorials>
11 </tutorials>
12 <methods>
13 <method name="get_default_theme">
14 <return type="Theme" />
15 <description>
16 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.
17 </description>
18 </method>
19 <method name="get_project_theme">
20 <return type="Theme" />
21 <description>
22 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.
23 To set the project theme, see [member ProjectSettings.gui/theme/custom].
24 </description>
25 </method>
26 </methods>
27 <members>
28 <member name="fallback_base_scale" type="float" setter="set_fallback_base_scale" getter="get_fallback_base_scale" default="1.0">
29 The fallback base scale factor of every [Control] node and [Theme] resource. Used when no other value is available to the control.
30 See also [member Theme.default_base_scale].
31 </member>
32 <member name="fallback_font" type="Font" setter="set_fallback_font" getter="get_fallback_font">
33 The fallback font of every [Control] node and [Theme] resource. Used when no other value is available to the control.
34 See also [member Theme.default_font].
35 </member>
36 <member name="fallback_font_size" type="int" setter="set_fallback_font_size" getter="get_fallback_font_size" default="16">
37 The fallback font size of every [Control] node and [Theme] resource. Used when no other value is available to the control.
38 See also [member Theme.default_font_size].
39 </member>
40 <member name="fallback_icon" type="Texture2D" setter="set_fallback_icon" getter="get_fallback_icon">
41 The fallback icon of every [Control] node and [Theme] resource. Used when no other value is available to the control.
42 </member>
43 <member name="fallback_sound" type="AudioStream" setter="set_fallback_sound" getter="get_fallback_sound">
44 The fallback sound of every [Control] node and [Theme] resource. Used when no other value is available to the control.
45 </member>
46 <member name="fallback_stylebox" type="StyleBox" setter="set_fallback_stylebox" getter="get_fallback_stylebox">
47 The fallback stylebox of every [Control] node and [Theme] resource. Used when no other value is available to the control.
48 </member>
49 </members>
50 <signals>
51 <signal name="fallback_changed">
52 <description>
53 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.
54 </description>
55 </signal>
56 </signals>
57</class>