123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- :github_url: hide
- .. 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.
- Methods
- -------
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_property_info<class_EditorSettings_method_add_property_info>` **(** :ref:`Dictionary<class_Dictionary>` info **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`erase<class_EditorSettings_method_erase>` **(** :ref:`String<class_String>` property **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_favorites<class_EditorSettings_method_get_favorites>` **(** **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`get_project_metadata<class_EditorSettings_method_get_project_metadata>` **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` default=null **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_project_settings_dir<class_EditorSettings_method_get_project_settings_dir>` **(** **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_recent_dirs<class_EditorSettings_method_get_recent_dirs>` **(** **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`get_setting<class_EditorSettings_method_get_setting>` **(** :ref:`String<class_String>` name **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_settings_dir<class_EditorSettings_method_get_settings_dir>` **(** **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_setting<class_EditorSettings_method_has_setting>` **(** :ref:`String<class_String>` name **)** const |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`property_can_revert<class_EditorSettings_method_property_can_revert>` **(** :ref:`String<class_String>` name **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`property_get_revert<class_EditorSettings_method_property_get_revert>` **(** :ref:`String<class_String>` name **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_favorites<class_EditorSettings_method_set_favorites>` **(** :ref:`PoolStringArray<class_PoolStringArray>` dirs **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_initial_value<class_EditorSettings_method_set_initial_value>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` update_current **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_project_metadata<class_EditorSettings_method_set_project_metadata>` **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` data **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_recent_dirs<class_EditorSettings_method_set_recent_dirs>` **(** :ref:`PoolStringArray<class_PoolStringArray>` dirs **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_setting<class_EditorSettings_method_set_setting>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** |
- +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Signals
- -------
- .. _class_EditorSettings_signal_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()
- Method Descriptions
- -------------------
- .. _class_EditorSettings_method_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_method_erase:
- - void **erase** **(** :ref:`String<class_String>` property **)**
- Erase a given setting (pass full property path).
- ----
- .. _class_EditorSettings_method_get_favorites:
- - :ref:`PoolStringArray<class_PoolStringArray>` **get_favorites** **(** **)** const
- Get the list of favorite files and directories for this project.
- ----
- .. _class_EditorSettings_method_get_project_metadata:
- - :ref:`Variant<class_Variant>` **get_project_metadata** **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` default=null **)** const
- ----
- .. _class_EditorSettings_method_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_method_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_method_get_setting:
- - :ref:`Variant<class_Variant>` **get_setting** **(** :ref:`String<class_String>` name **)** const
- ----
- .. _class_EditorSettings_method_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_method_has_setting:
- - :ref:`bool<class_bool>` **has_setting** **(** :ref:`String<class_String>` name **)** const
- ----
- .. _class_EditorSettings_method_property_can_revert:
- - :ref:`bool<class_bool>` **property_can_revert** **(** :ref:`String<class_String>` name **)**
- ----
- .. _class_EditorSettings_method_property_get_revert:
- - :ref:`Variant<class_Variant>` **property_get_revert** **(** :ref:`String<class_String>` name **)**
- ----
- .. _class_EditorSettings_method_set_favorites:
- - void **set_favorites** **(** :ref:`PoolStringArray<class_PoolStringArray>` dirs **)**
- Set the list of favorite files and directories for this project.
- ----
- .. _class_EditorSettings_method_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_method_set_project_metadata:
- - void **set_project_metadata** **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` data **)**
- ----
- .. _class_EditorSettings_method_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_method_set_setting:
- - void **set_setting** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)**
|