summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorAriel Manzur <ariel@okamstudio.com>2016-02-27 12:11:40 -0300
committerAriel Manzur <ariel@okamstudio.com>2016-02-27 12:11:40 -0300
commit30d0ca97664a7645ce8b2af7d169f0cee3248953 (patch)
tree91ff0ccd921e93ea1b2051e57a831748c7170fd6 /tools/editor
parent08e0e64a192940468b0f74b594fbaff32b39dfd6 (diff)
added [presets] to ._sc_ and "android/shutdown_adb_on_exit" to editor_settings
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/editor_settings.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 83071a2e15..d7df661473 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -564,13 +564,29 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("resources/save_compressed_resources",true);
set("resources/auto_reload_modified_images",true);
- if (p_extra_config.is_valid() && p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
+ if (p_extra_config.is_valid()) {
- Vector<String> list = p_extra_config->get_value("init_projects", "list");
- for (int i=0; i<list.size(); i++) {
+ if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
+
+ Vector<String> list = p_extra_config->get_value("init_projects", "list");
+ for (int i=0; i<list.size(); i++) {
+
+ String name = list[i].replace("/", "::");
+ set("projects/"+name, list[i]);
+ };
+ };
+
+ if (p_extra_config->has_section("presets")) {
+
+ List<String> keys;
+ p_extra_config->get_section_keys("presets", &keys);
+
+ for (List<String>::Element *E=keys.front();E;E=E->next()) {
- String name = list[i].replace("/", "::");
- set("projects/"+name, list[i]);
+ String key = E->get();
+ Variant val = p_extra_config->get_value("presets", key);
+ set(key, val);
+ };
};
};