class_editorsettings.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_EditorSettings:
  4. EditorSettings
  5. ==============
  6. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Object that holds the project-independent editor settings.
  11. Member Functions
  12. ----------------
  13. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`add_property_info<class_EditorSettings_add_property_info>` **(** :ref:`Dictionary<class_dictionary>` info **)** |
  15. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`erase<class_EditorSettings_erase>` **(** :ref:`String<class_string>` property **)** |
  17. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`StringArray<class_stringarray>` | :ref:`get_favorite_dirs<class_EditorSettings_get_favorite_dirs>` **(** **)** const |
  19. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`String<class_string>` | :ref:`get_project_settings_path<class_EditorSettings_get_project_settings_path>` **(** **)** const |
  21. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`StringArray<class_stringarray>` | :ref:`get_recent_dirs<class_EditorSettings_get_recent_dirs>` **(** **)** const |
  23. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`String<class_string>` | :ref:`get_settings_path<class_EditorSettings_get_settings_path>` **(** **)** const |
  25. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`set_favorite_dirs<class_EditorSettings_set_favorite_dirs>` **(** :ref:`StringArray<class_stringarray>` dirs **)** |
  27. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`set_recent_dirs<class_EditorSettings_set_recent_dirs>` **(** :ref:`StringArray<class_stringarray>` dirs **)** |
  29. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
  30. Signals
  31. -------
  32. - **settings_changed** **(** **)**
  33. Description
  34. -----------
  35. Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu.
  36. Accessing the settings is done by using the regular :ref:`Object<class_object>` API, such as:
  37. ::
  38. settings.set(prop,value)
  39. settings.get(prop)
  40. list_of_settings = settings.get_property_list()
  41. Member Function Description
  42. ---------------------------
  43. .. _class_EditorSettings_add_property_info:
  44. - void **add_property_info** **(** :ref:`Dictionary<class_dictionary>` info **)**
  45. 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:`@Global Scope<class_@global scope>`), and optionally hint::ref:`int<class_int>`(see PROPERTY_HINT\_\* in :ref:`@Global Scope<class_@global scope>`), hint_string::ref:`String<class_string>`.
  46. Example:
  47. ::
  48. editor_settings.set("category/property_name", 0)
  49. var property_info = {
  50. "name": "category/property_name",
  51. "type": TYPE_INT,
  52. "hint": PROPERTY_HINT_ENUM,
  53. "hint_string": "one,two,three"
  54. }
  55. editor_settings.add_property_info(property_info)
  56. .. _class_EditorSettings_erase:
  57. - void **erase** **(** :ref:`String<class_string>` property **)**
  58. Erase a given setting (pass full property path).
  59. .. _class_EditorSettings_get_favorite_dirs:
  60. - :ref:`StringArray<class_stringarray>` **get_favorite_dirs** **(** **)** const
  61. Get the list of favorite directories for this project.
  62. .. _class_EditorSettings_get_project_settings_path:
  63. - :ref:`String<class_string>` **get_project_settings_path** **(** **)** const
  64. Get the specific project settings path. Projects all have an unique sub-directory inside the settings path where project specific settings are saved.
  65. .. _class_EditorSettings_get_recent_dirs:
  66. - :ref:`StringArray<class_stringarray>` **get_recent_dirs** **(** **)** const
  67. Get the list of recently visited folders in the file dialog for this project.
  68. .. _class_EditorSettings_get_settings_path:
  69. - :ref:`String<class_string>` **get_settings_path** **(** **)** const
  70. Get the global settings path for the engine. Inside this path you can find some standard paths such as:
  71. settings/tmp - used for temporary storage of files
  72. settings/templates - where export templates are located
  73. .. _class_EditorSettings_set_favorite_dirs:
  74. - void **set_favorite_dirs** **(** :ref:`StringArray<class_stringarray>` dirs **)**
  75. Set the list of favorite directories for this project.
  76. .. _class_EditorSettings_set_recent_dirs:
  77. - void **set_recent_dirs** **(** :ref:`StringArray<class_stringarray>` dirs **)**
  78. Set the list of recently visited folders in the file dialog for this project.