mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
168 lines
11 KiB
ReStructuredText
168 lines
11 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the EditorSettings.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_EditorSettings:
|
|
|
|
EditorSettings
|
|
==============
|
|
|
|
**Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Object that holds the project-independent editor settings.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_property_info<class_EditorSettings_add_property_info>` **(** :ref:`Dictionary<class_dictionary>` info **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`erase<class_EditorSettings_erase>` **(** :ref:`String<class_string>` property **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_favorite_dirs<class_EditorSettings_get_favorite_dirs>` **(** **)** const |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_string>` | :ref:`get_project_settings_dir<class_EditorSettings_get_project_settings_dir>` **(** **)** const |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_recent_dirs<class_EditorSettings_get_recent_dirs>` **(** **)** const |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_variant>` | :ref:`get_setting<class_EditorSettings_get_setting>` **(** :ref:`String<class_string>` name **)** const |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_string>` | :ref:`get_settings_dir<class_EditorSettings_get_settings_dir>` **(** **)** const |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_setting<class_EditorSettings_has_setting>` **(** :ref:`String<class_string>` name **)** const |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`property_can_revert<class_EditorSettings_property_can_revert>` **(** :ref:`String<class_string>` name **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_variant>` | :ref:`property_get_revert<class_EditorSettings_property_get_revert>` **(** :ref:`String<class_string>` name **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_favorite_dirs<class_EditorSettings_set_favorite_dirs>` **(** :ref:`PoolStringArray<class_poolstringarray>` dirs **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_initial_value<class_EditorSettings_set_initial_value>` **(** :ref:`String<class_string>` name, :ref:`Variant<class_variant>` value, :ref:`bool<class_bool>` update_current **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_recent_dirs<class_EditorSettings_set_recent_dirs>` **(** :ref:`PoolStringArray<class_poolstringarray>` dirs **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_setting<class_EditorSettings_set_setting>` **(** :ref:`String<class_string>` name, :ref:`Variant<class_variant>` value **)** |
|
|
+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Signals
|
|
-------
|
|
|
|
.. _class_EditorSettings_settings_changed:
|
|
|
|
- **settings_changed** **(** **)**
|
|
|
|
|
|
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 :ref:`Object<class_object>` API, such as:
|
|
|
|
::
|
|
|
|
settings.set(prop,value)
|
|
settings.get(prop)
|
|
list_of_settings = settings.get_property_list()
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_EditorSettings_add_property_info:
|
|
|
|
- void **add_property_info** **(** :ref:`Dictionary<class_dictionary>` info **)**
|
|
|
|
Add a custom property info to a property. The dictionary must contain: name::ref:`String<class_string>`(the name of the property) and type::ref:`int<class_int>`(see TYPE\_\* in :ref:`@GlobalScope<class_@globalscope>`), and optionally hint::ref:`int<class_int>`(see PROPERTY_HINT\_\* in :ref:`@GlobalScope<class_@globalscope>`), hint_string::ref:`String<class_string>`.
|
|
|
|
Example:
|
|
|
|
::
|
|
|
|
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)
|
|
|
|
.. _class_EditorSettings_erase:
|
|
|
|
- void **erase** **(** :ref:`String<class_string>` property **)**
|
|
|
|
Erase a given setting (pass full property path).
|
|
|
|
.. _class_EditorSettings_get_favorite_dirs:
|
|
|
|
- :ref:`PoolStringArray<class_poolstringarray>` **get_favorite_dirs** **(** **)** const
|
|
|
|
Get the list of favorite directories for this project.
|
|
|
|
.. _class_EditorSettings_get_project_settings_dir:
|
|
|
|
- :ref:`String<class_string>` **get_project_settings_dir** **(** **)** const
|
|
|
|
Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
|
|
|
|
.. _class_EditorSettings_get_recent_dirs:
|
|
|
|
- :ref:`PoolStringArray<class_poolstringarray>` **get_recent_dirs** **(** **)** const
|
|
|
|
Get the list of recently visited folders in the file dialog for this project.
|
|
|
|
.. _class_EditorSettings_get_setting:
|
|
|
|
- :ref:`Variant<class_variant>` **get_setting** **(** :ref:`String<class_string>` name **)** const
|
|
|
|
.. _class_EditorSettings_get_settings_dir:
|
|
|
|
- :ref:`String<class_string>` **get_settings_dir** **(** **)** const
|
|
|
|
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
|
|
|
|
.. _class_EditorSettings_has_setting:
|
|
|
|
- :ref:`bool<class_bool>` **has_setting** **(** :ref:`String<class_string>` name **)** const
|
|
|
|
.. _class_EditorSettings_property_can_revert:
|
|
|
|
- :ref:`bool<class_bool>` **property_can_revert** **(** :ref:`String<class_string>` name **)**
|
|
|
|
.. _class_EditorSettings_property_get_revert:
|
|
|
|
- :ref:`Variant<class_variant>` **property_get_revert** **(** :ref:`String<class_string>` name **)**
|
|
|
|
.. _class_EditorSettings_set_favorite_dirs:
|
|
|
|
- void **set_favorite_dirs** **(** :ref:`PoolStringArray<class_poolstringarray>` dirs **)**
|
|
|
|
Set the list of favorite directories for this project.
|
|
|
|
.. _class_EditorSettings_set_initial_value:
|
|
|
|
- void **set_initial_value** **(** :ref:`String<class_string>` name, :ref:`Variant<class_variant>` value, :ref:`bool<class_bool>` update_current **)**
|
|
|
|
.. _class_EditorSettings_set_recent_dirs:
|
|
|
|
- void **set_recent_dirs** **(** :ref:`PoolStringArray<class_poolstringarray>` dirs **)**
|
|
|
|
Set the list of recently visited folders in the file dialog for this project.
|
|
|
|
.. _class_EditorSettings_set_setting:
|
|
|
|
- void **set_setting** **(** :ref:`String<class_string>` name, :ref:`Variant<class_variant>` value **)**
|
|
|
|
|