summaryrefslogtreecommitdiff
path: root/doc/classes/EditorSettings.xml
blob: ef50c34792d778d3c7a4bf7a97beceb126bb3ab4 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSettings" inherits="Resource" category="Core" version="3.1-dev">
	<brief_description>
		Object that holds the project-independent editor settings.
	</brief_description>
	<description>
		Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu.
		Accessing the settings is done by using the regular [Object] API, such as:
		[codeblock]
		settings.set(prop,value)
		settings.get(prop)
		list_of_settings = settings.get_property_list()
		[/codeblock]
	</description>
	<tutorials>
	</tutorials>
	<demos>
	</demos>
	<methods>
		<method name="add_property_info">
			<return type="void">
			</return>
			<argument index="0" name="info" type="Dictionary">
			</argument>
			<description>
				Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@GlobalScope]), and optionally hint:[int](see PROPERTY_HINT_* in [@GlobalScope]), hint_string:[String].
				Example:
				[codeblock]
				editor_settings.set("category/property_name", 0)

				var property_info = {
				    "name": "category/property_name",
				    "type": TYPE_INT,
				    "hint": PROPERTY_HINT_ENUM,
				    "hint_string": "one,two,three"
				}

				editor_settings.add_property_info(property_info)
				[/codeblock]
			</description>
		</method>
		<method name="erase">
			<return type="void">
			</return>
			<argument index="0" name="property" type="String">
			</argument>
			<description>
				Erase a given setting (pass full property path).
			</description>
		</method>
		<method name="get_favorite_dirs" qualifiers="const">
			<return type="PoolStringArray">
			</return>
			<description>
				Get the list of favorite directories for this project.
			</description>
		</method>
		<method name="get_project_settings_dir" qualifiers="const">
			<return type="String">
			</return>
			<description>
				Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
			</description>
		</method>
		<method name="get_recent_dirs" qualifiers="const">
			<return type="PoolStringArray">
			</return>
			<description>
				Get the list of recently visited folders in the file dialog for this project.
			</description>
		</method>
		<method name="get_setting" qualifiers="const">
			<return type="Variant">
			</return>
			<argument index="0" name="name" type="String">
			</argument>
			<description>
			</description>
		</method>
		<method name="get_settings_dir" qualifiers="const">
			<return type="String">
			</return>
			<description>
				Get the global settings path for the engine. Inside this path you can find some standard paths such as:
				settings/tmp - used for temporary storage of files
				settings/templates - where export templates are located
			</description>
		</method>
		<method name="has_setting" qualifiers="const">
			<return type="bool">
			</return>
			<argument index="0" name="name" type="String">
			</argument>
			<description>
			</description>
		</method>
		<method name="property_can_revert">
			<return type="bool">
			</return>
			<argument index="0" name="name" type="String">
			</argument>
			<description>
			</description>
		</method>
		<method name="property_get_revert">
			<return type="Variant">
			</return>
			<argument index="0" name="name" type="String">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_favorite_dirs">
			<return type="void">
			</return>
			<argument index="0" name="dirs" type="PoolStringArray">
			</argument>
			<description>
				Set the list of favorite directories for this project.
			</description>
		</method>
		<method name="set_initial_value">
			<return type="void">
			</return>
			<argument index="0" name="name" type="String">
			</argument>
			<argument index="1" name="value" type="Variant">
			</argument>
			<argument index="2" name="update_current" type="bool">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_recent_dirs">
			<return type="void">
			</return>
			<argument index="0" name="dirs" type="PoolStringArray">
			</argument>
			<description>
				Set the list of recently visited folders in the file dialog for this project.
			</description>
		</method>
		<method name="set_setting">
			<return type="void">
			</return>
			<argument index="0" name="name" type="String">
			</argument>
			<argument index="1" name="value" type="Variant">
			</argument>
			<description>
			</description>
		</method>
	</methods>
	<signals>
		<signal name="settings_changed">
			<description>
			</description>
		</signal>
	</signals>
	<constants>
	</constants>
</class>