2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-04-01 10:33:56 +00:00
<class name= "EditorSettings" inherits= "Resource" category= "Core" version= "3.2" >
2017-09-12 20:42:36 +00:00
<brief_description >
Object that holds the project-independent editor settings.
</brief_description>
<description >
2019-06-21 23:04:47 +00:00
Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor > Editor Settings[/b] menu.
2017-09-12 20:42:36 +00:00
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>
<methods >
<method name= "add_property_info" >
<return type= "void" >
</return>
<argument index= "0" name= "info" type= "Dictionary" >
</argument>
<description >
2019-06-21 23:04:47 +00:00
Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String].
[b]Example:[/b]
2017-09-12 20:42:36 +00:00
[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>
2018-09-18 12:02:59 +00:00
<method name= "get_favorites" qualifiers= "const" >
2017-09-12 20:42:36 +00:00
<return type= "PoolStringArray" >
</return>
<description >
2019-06-21 23:04:47 +00:00
Gets the list of favorite files and directories for this project.
2017-09-12 20:42:36 +00:00
</description>
</method>
2018-05-16 15:23:20 +00:00
<method name= "get_project_metadata" qualifiers= "const" >
<return type= "Variant" >
</return>
<argument index= "0" name= "section" type= "String" >
</argument>
<argument index= "1" name= "key" type= "String" >
</argument>
<argument index= "2" name= "default" type= "Variant" default= "null" >
</argument>
<description >
</description>
</method>
2018-05-28 12:53:15 +00:00
<method name= "get_project_settings_dir" qualifiers= "const" >
2017-09-12 20:42:36 +00:00
<return type= "String" >
</return>
<description >
2019-06-21 23:04:47 +00:00
Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_recent_dirs" qualifiers= "const" >
<return type= "PoolStringArray" >
</return>
<description >
2019-06-21 23:04:47 +00:00
Gets the list of recently visited folders in the file dialog for this project.
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-10-11 21:54:43 +00:00
<method name= "get_setting" qualifiers= "const" >
<return type= "Variant" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
</description>
</method>
2017-11-17 14:50:18 +00:00
<method name= "get_settings_dir" qualifiers= "const" >
2017-09-12 20:42:36 +00:00
<return type= "String" >
</return>
<description >
2019-06-21 23:04:47 +00:00
Gets the global settings path for the engine. Inside this path, you can find some standard paths such as:
[code]settings/tmp[/code] - Used for temporary storage of files
[code]settings/templates[/code] - Where export templates are located
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-10-11 21:54:43 +00:00
<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>
2018-09-18 12:02:59 +00:00
<method name= "set_favorites" >
2017-09-12 20:42:36 +00:00
<return type= "void" >
</return>
<argument index= "0" name= "dirs" type= "PoolStringArray" >
</argument>
<description >
2019-06-21 23:04:47 +00:00
Sets the list of favorite files and directories for this project.
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-10-11 21:54:43 +00:00
<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>
2018-01-09 15:52:46 +00:00
<argument index= "2" name= "update_current" type= "bool" >
</argument>
2017-10-11 21:54:43 +00:00
<description >
</description>
</method>
2018-05-16 15:23:20 +00:00
<method name= "set_project_metadata" >
2018-05-28 12:53:15 +00:00
<return type= "void" >
</return>
2018-05-16 15:23:20 +00:00
<argument index= "0" name= "section" type= "String" >
</argument>
<argument index= "1" name= "key" type= "String" >
</argument>
<argument index= "2" name= "data" type= "Variant" >
</argument>
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "set_recent_dirs" >
<return type= "void" >
</return>
<argument index= "0" name= "dirs" type= "PoolStringArray" >
</argument>
<description >
2019-06-21 23:04:47 +00:00
Sets the list of recently visited folders in the file dialog for this project.
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-10-11 21:54:43 +00:00
<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>
2017-09-12 20:42:36 +00:00
</methods>
<signals >
<signal name= "settings_changed" >
<description >
2019-07-05 08:28:59 +00:00
Emitted when editor settings change.
2017-09-12 20:42:36 +00:00
</description>
</signal>
</signals>
<constants >
2019-07-05 08:28:59 +00:00
<constant name= "NOTIFICATION_EDITOR_SETTINGS_CHANGED" value= "10000" >
2019-07-07 16:53:54 +00:00
Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes.
2019-07-05 08:28:59 +00:00
</constant>
2017-09-12 20:42:36 +00:00
</constants>
</class>