From 99ceddd11ef652a3b8e6bf5d09dcc519d957ce14 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 5 Jan 2017 19:41:36 -0300 Subject: [PATCH] Editor settings categories are now tidy and beautiful! --- bin/tests/test_math.cpp | 14 + modules/gridmap/grid_map_editor_plugin.cpp | 8 +- .../visual_script/visual_script_editor.cpp | 16 +- platform/android/export/export.cpp | 50 +-- platform/bb10/export/export.cpp | 48 +-- scene/gui/color_picker.cpp | 2 +- scene/gui/control.cpp | 2 +- scene/gui/line_edit.cpp | 8 +- tools/editor/animation_editor.cpp | 2 +- tools/editor/code_editor.cpp | 50 +-- tools/editor/connections_dialog.cpp | 2 +- tools/editor/create_dialog.cpp | 2 +- tools/editor/editor_dir_dialog.cpp | 2 +- tools/editor/editor_file_dialog.cpp | 8 +- tools/editor/editor_fonts.cpp | 10 +- tools/editor/editor_help.cpp | 116 +++---- tools/editor/editor_import_export.cpp | 4 +- tools/editor/editor_node.cpp | 36 +-- tools/editor/editor_resource_preview.cpp | 4 +- tools/editor/editor_run.cpp | 6 +- tools/editor/editor_settings.cpp | 306 +++++++++--------- tools/editor/editor_themes.cpp | 4 +- .../editor/fileserver/editor_file_server.cpp | 8 +- tools/editor/filesystem_dock.cpp | 6 +- .../animation_player_editor_plugin.cpp | 4 +- .../plugins/canvas_item_editor_plugin.cpp | 12 +- .../collision_polygon_2d_editor_plugin.cpp | 2 +- .../collision_polygon_editor_plugin.cpp | 2 +- .../plugins/cube_grid_theme_editor_plugin.cpp | 6 +- .../editor/plugins/editor_preview_plugins.cpp | 20 +- .../light_occluder_2d_editor_plugin.cpp | 2 +- .../navigation_polygon_editor_plugin.cpp | 2 +- .../editor/plugins/path_2d_editor_plugin.cpp | 2 +- .../plugins/polygon_2d_editor_plugin.cpp | 2 +- tools/editor/plugins/sample_editor_plugin.cpp | 2 +- tools/editor/plugins/script_editor_plugin.cpp | 72 ++--- tools/editor/plugins/script_text_editor.cpp | 64 ++-- tools/editor/plugins/shader_editor_plugin.cpp | 72 ++--- .../editor/plugins/spatial_editor_plugin.cpp | 30 +- .../editor/plugins/tile_map_editor_plugin.cpp | 18 +- tools/editor/project_export.cpp | 6 +- tools/editor/project_manager.cpp | 12 +- tools/editor/property_editor.cpp | 15 +- tools/editor/pvrtc_compress.cpp | 4 +- tools/editor/scene_tree_dock.cpp | 8 +- tools/editor/scene_tree_editor.cpp | 4 +- tools/editor/settings_config_dialog.cpp | 2 +- 47 files changed, 546 insertions(+), 531 deletions(-) diff --git a/bin/tests/test_math.cpp b/bin/tests/test_math.cpp index 2ffef83f79..e3e74af14c 100644 --- a/bin/tests/test_math.cpp +++ b/bin/tests/test_math.cpp @@ -477,6 +477,20 @@ uint32_t ihash3( uint32_t a) MainLoop* test() { + Matrix3 m; + m.rotate(Vector3(0,1,0),Math_PI*0.5); + + print_line(m.scaled(Vector3(0.5,1,1))); + Matrix3 s; + s.scale(Vector3(0.5,1.0,1.0)); + + print_line(m * s); + + + + + + return NULL; List cmdlargs = OS::get_singleton()->get_cmdline_args(); diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index e55665b1f5..08f2c4fbbc 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -731,7 +731,7 @@ void GridMapEditor::update_pallete() { theme_pallete->set_icon_mode(ItemList::ICON_MODE_LEFT); } - float min_size = EDITOR_DEF("grid_map/preview_size",64); + float min_size = EDITOR_DEF("editors/grid_map/preview_size",64); theme_pallete->set_fixed_icon_size(Size2(min_size, min_size)); theme_pallete->set_fixed_column_width(min_size*3/2); theme_pallete->set_max_text_lines(2); @@ -1201,7 +1201,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { editor=p_editor; undo_redo=p_editor->get_undo_redo(); - int mw = EDITOR_DEF("grid_map/palette_min_width",230); + int mw = EDITOR_DEF("editors/grid_map/palette_min_width",230); Control *ec = memnew( Control); ec->set_custom_minimum_size(Size2(mw,0)); add_child(ec); @@ -1263,7 +1263,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { settings_pick_distance->set_max(10000.0f); settings_pick_distance->set_min(500.0f); settings_pick_distance->set_step(1.0f); - settings_pick_distance->set_value(EDITOR_DEF("grid_map/pick_distance", 5000.0)); + settings_pick_distance->set_value(EDITOR_DEF("editors/grid_map/pick_distance", 5000.0)); settings_vbc->add_margin_child("Pick Distance:", settings_pick_distance); clip_mode=CLIP_DISABLED; @@ -1296,6 +1296,8 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { hb->add_child(mode_list); mode_list->connect("pressed", this, "_set_display_mode", varray(DISPLAY_LIST)); + EDITOR_DEF("editors/grid_map/preview_size",64) + display_mode = DISPLAY_THUMBNAIL; selected_area=-1; diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index f9285fcf6c..91c22fc02b 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -485,8 +485,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) { gnode->set_overlay(GraphNode::OVERLAY_BREAKPOINT); } - if (EditorSettings::get_singleton()->has("visual_script_editor/color_"+node->get_category())) { - gnode->set_modulate(EditorSettings::get_singleton()->get("visual_script_editor/color_"+node->get_category())); + if (EditorSettings::get_singleton()->has("editors/visual_script/color_"+node->get_category())) { + gnode->set_modulate(EditorSettings::get_singleton()->get("editors/visual_script/color_"+node->get_category())); } @@ -3500,12 +3500,12 @@ void VisualScriptEditor::free_clipboard() { static void register_editor_callback() { ScriptEditor::register_create_script_editor_function(create_editor); - EditorSettings::get_singleton()->set("visual_script_editor/color_functions",Color(1,0.9,0.9)); - EditorSettings::get_singleton()->set("visual_script_editor/color_data",Color(0.9,1.0,0.9)); - EditorSettings::get_singleton()->set("visual_script_editor/color_operators",Color(0.9,0.9,1.0)); - EditorSettings::get_singleton()->set("visual_script_editor/color_flow_control",Color(1.0,1.0,0.8)); - EditorSettings::get_singleton()->set("visual_script_editor/color_custom",Color(0.8,1.0,1.0)); - EditorSettings::get_singleton()->set("visual_script_editor/color_constants",Color(1.0,0.8,1.0)); + EditorSettings::get_singleton()->set("editors/visual_script/color_functions",Color(1,0.9,0.9)); + EditorSettings::get_singleton()->set("editors/visual_script/color_data",Color(0.9,1.0,0.9)); + EditorSettings::get_singleton()->set("editors/visual_script/color_operators",Color(0.9,0.9,1.0)); + EditorSettings::get_singleton()->set("editors/visual_script/color_flow_control",Color(1.0,1.0,0.8)); + EditorSettings::get_singleton()->set("editors/visual_script/color_custom",Color(0.8,1.0,1.0)); + EditorSettings::get_singleton()->set("editors/visual_script/color_constants",Color(1.0,0.8,1.0)); ED_SHORTCUT("visual_script_editor/delete_selected", TTR("Delete Selected")); diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 3259f0a165..e836258e04 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1212,9 +1212,9 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d if (p_flags&EXPORT_DUMB_CLIENT) { - /*String host = EditorSettings::get_singleton()->get("file_server/host"); - int port = EditorSettings::get_singleton()->get("file_server/post"); - String passwd = EditorSettings::get_singleton()->get("file_server/password"); + /*String host = EditorSettings::get_singleton()->get("filesystem/file_server/host"); + int port = EditorSettings::get_singleton()->get("filesystem/file_server/post"); + String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password"); cl.push_back("-rfs"); cl.push_back(host+":"+itos(port)); if (passwd!="") { @@ -1305,7 +1305,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d if (_signed) { - String jarsigner=EditorSettings::get_singleton()->get("android/jarsigner"); + String jarsigner=EditorSettings::get_singleton()->get("export/android/jarsigner"); if (!FileAccess::exists(jarsigner)) { EditorNode::add_io_error("'jarsigner' could not be found.\nPlease supply a path in the editor settings.\nResulting apk is unsigned."); return OK; @@ -1315,9 +1315,9 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d String password; String user; if (p_debug) { - keystore=EditorSettings::get_singleton()->get("android/debug_keystore"); - password=EditorSettings::get_singleton()->get("android/debug_keystore_pass"); - user=EditorSettings::get_singleton()->get("android/debug_keystore_user"); + keystore=EditorSettings::get_singleton()->get("export/android/debug_keystore"); + password=EditorSettings::get_singleton()->get("export/android/debug_keystore_pass"); + user=EditorSettings::get_singleton()->get("export/android/debug_keystore_user"); ep.step("Signing Debug APK..",103); @@ -1340,7 +1340,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d args.push_back("SHA1"); args.push_back("-sigalg"); args.push_back("MD5withRSA"); - String tsa_url=EditorSettings::get_singleton()->get("android/timestamping_authority_url"); + String tsa_url=EditorSettings::get_singleton()->get("export/android/timestamping_authority_url"); if (tsa_url != "") { args.push_back("-tsa"); args.push_back(tsa_url); @@ -1506,7 +1506,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { while(!ea->quit_request) { - String adb=EditorSettings::get_singleton()->get("android/adb"); + String adb=EditorSettings::get_singleton()->get("export/android/adb"); if (FileAccess::exists(adb)) { String devices; @@ -1628,8 +1628,8 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { } - if (EditorSettings::get_singleton()->get("android/shutdown_adb_on_exit")) { - String adb=EditorSettings::get_singleton()->get("android/adb"); + if (EditorSettings::get_singleton()->get("export/android/shutdown_adb_on_exit")) { + String adb=EditorSettings::get_singleton()->get("export/android/adb"); if (!FileAccess::exists(adb)) { return; //adb not configured } @@ -1647,7 +1647,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { EditorProgress ep("run","Running on "+devices[p_device].name,3); - String adb=EditorSettings::get_singleton()->get("android/adb"); + String adb=EditorSettings::get_singleton()->get("export/android/adb"); if (adb=="") { EditorNode::add_io_error("ADB executable not configured in settings, can't run."); @@ -1659,7 +1659,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { ep.step("Exporting APK",0); - bool use_adb_over_usb = bool(EDITOR_DEF("android/use_remote_debug_over_adb",true)); + bool use_adb_over_usb = bool(EDITOR_DEF("export/android/use_remote_debug_over_adb",true)); if (use_adb_over_usb) { p_flags|=EXPORT_REMOTE_DEBUG_LOCALHOST; @@ -1728,7 +1728,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv); print_line("Reverse result: "+itos(rv)); - int fs_port = EditorSettings::get_singleton()->get("file_server/port"); + int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port"); args.clear(); args.push_back("reverse"); @@ -1822,7 +1822,7 @@ EditorExportPlatformAndroid::EditorExportPlatformAndroid() { bool EditorExportPlatformAndroid::can_export(String *r_error) const { bool valid=true; - String adb=EditorSettings::get_singleton()->get("android/adb"); + String adb=EditorSettings::get_singleton()->get("export/android/adb"); String err; if (!FileAccess::exists(adb)) { @@ -1831,7 +1831,7 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const { err+="ADB executable not configured in editor settings.\n"; } - String js = EditorSettings::get_singleton()->get("android/jarsigner"); + String js = EditorSettings::get_singleton()->get("export/android/jarsigner"); if (!FileAccess::exists(js)) { @@ -1839,7 +1839,7 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const { err+="OpenJDK 6 jarsigner not configured in editor settings.\n"; } - String dk = EditorSettings::get_singleton()->get("android/debug_keystore"); + String dk = EditorSettings::get_singleton()->get("export/android/debug_keystore"); if (!FileAccess::exists(dk)) { @@ -1893,20 +1893,20 @@ EditorExportPlatformAndroid::~EditorExportPlatformAndroid() { void register_android_exporter() { String exe_ext=OS::get_singleton()->get_name()=="Windows"?"exe":""; - EDITOR_DEF("android/adb",""); + EDITOR_DEF("export/android/adb",""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/adb",PROPERTY_HINT_GLOBAL_FILE,exe_ext)); - EDITOR_DEF("android/jarsigner",""); + EDITOR_DEF("export/android/jarsigner",""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/jarsigner",PROPERTY_HINT_GLOBAL_FILE,exe_ext)); - EDITOR_DEF("android/debug_keystore",""); + EDITOR_DEF("export/android/debug_keystore",""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/debug_keystore",PROPERTY_HINT_GLOBAL_FILE,"keystore")); - EDITOR_DEF("android/debug_keystore_user","androiddebugkey"); - EDITOR_DEF("android/debug_keystore_pass","android"); + EDITOR_DEF("export/android/debug_keystore_user","androiddebugkey"); + EDITOR_DEF("export/android/debug_keystore_pass","android"); //EDITOR_DEF("android/release_keystore",""); //EDITOR_DEF("android/release_username",""); //EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/release_keystore",PROPERTY_HINT_GLOBAL_FILE,"*.keystore")); - EDITOR_DEF("android/timestamping_authority_url",""); - EDITOR_DEF("android/use_remote_debug_over_adb",false); - EDITOR_DEF("android/shutdown_adb_on_exit",true); + EDITOR_DEF("export/android/timestamping_authority_url",""); + EDITOR_DEF("export/android/use_remote_debug_over_adb",false); + EDITOR_DEF("export/android/shutdown_adb_on_exit",true); Ref exporter = Ref( memnew(EditorExportPlatformAndroid) ); EditorImportExport::get_singleton()->add_export_platform(exporter); diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp index 6ba97b8b6e..cc994c8f24 100644 --- a/platform/bb10/export/export.cpp +++ b/platform/bb10/export/export.cpp @@ -469,7 +469,7 @@ Error EditorExportPlatformBB10::export_project(const String& p_path, bool p_debu ep.step("Creating BAR Package..",104); - String bb_packager=EditorSettings::get_singleton()->get("blackberry/host_tools"); + String bb_packager=EditorSettings::get_singleton()->get("export/blackberry/host_tools"); bb_packager=bb_packager.plus_file("blackberry-nativepackager"); if (OS::get_singleton()->get_name()=="Windows") bb_packager+=".bat"; @@ -485,7 +485,7 @@ Error EditorExportPlatformBB10::export_project(const String& p_path, bool p_debu args.push_back(p_path); if (p_debug) { - String debug_token=EditorSettings::get_singleton()->get("blackberry/debug_token"); + String debug_token=EditorSettings::get_singleton()->get("export/blackberry/debug_token"); if (!FileAccess::exists(debug_token)) { EditorNode::add_io_error("Debug token not found!"); } else { @@ -554,7 +554,7 @@ void EditorExportPlatformBB10::_device_poll_thread(void *ud) { while(!ea->quit_request) { - String bb_deploy=EditorSettings::get_singleton()->get("blackberry/host_tools"); + String bb_deploy=EditorSettings::get_singleton()->get("export/blackberry/host_tools"); bb_deploy=bb_deploy.plus_file("blackberry-deploy"); bool windows = OS::get_singleton()->get_name()=="Windows"; if (windows) @@ -567,10 +567,10 @@ void EditorExportPlatformBB10::_device_poll_thread(void *ud) { for (int i=0;iget("blackberry/device_"+itos(i+1)+"/host"); + String host = EditorSettings::get_singleton()->get("export/blackberry/device_"+itos(i+1)+"/host"); if (host==String()) continue; - String pass = EditorSettings::get_singleton()->get("blackberry/device_"+itos(i+1)+"/password"); + String pass = EditorSettings::get_singleton()->get("export/blackberry/device_"+itos(i+1)+"/password"); if (pass==String()) continue; @@ -661,7 +661,7 @@ Error EditorExportPlatformBB10::run(int p_device, int p_flags) { ERR_FAIL_INDEX_V(p_device,devices.size(),ERR_INVALID_PARAMETER); - String bb_deploy=EditorSettings::get_singleton()->get("blackberry/host_tools"); + String bb_deploy=EditorSettings::get_singleton()->get("export/blackberry/host_tools"); bb_deploy=bb_deploy.plus_file("blackberry-deploy"); if (OS::get_singleton()->get_name()=="Windows") bb_deploy+=".bat"; @@ -714,8 +714,8 @@ Error EditorExportPlatformBB10::run(int p_device, int p_flags) { args.push_back("-installApp"); args.push_back("-launchApp"); args.push_back("-device"); - String host = EditorSettings::get_singleton()->get("blackberry/device_"+itos(p_device+1)+"/host"); - String pass = EditorSettings::get_singleton()->get("blackberry/device_"+itos(p_device+1)+"/password"); + String host = EditorSettings::get_singleton()->get("export/blackberry/device_"+itos(p_device+1)+"/host"); + String pass = EditorSettings::get_singleton()->get("export/blackberry/device_"+itos(p_device+1)+"/password"); args.push_back(host); args.push_back("-password"); args.push_back(pass); @@ -761,7 +761,7 @@ EditorExportPlatformBB10::EditorExportPlatformBB10() { bool EditorExportPlatformBB10::can_export(String *r_error) const { bool valid=true; - String bb_deploy=EditorSettings::get_singleton()->get("blackberry/host_tools"); + String bb_deploy=EditorSettings::get_singleton()->get("export/blackberry/host_tools"); String err; if (!FileAccess::exists(bb_deploy.plus_file("blackberry-deploy"))) { @@ -775,7 +775,7 @@ bool EditorExportPlatformBB10::can_export(String *r_error) const { err+="No export template found.\nDownload and install export templates.\n"; } - String debug_token=EditorSettings::get_singleton()->get("blackberry/debug_token"); + String debug_token=EditorSettings::get_singleton()->get("export/blackberry/debug_token"); if (!FileAccess::exists(debug_token)) { valid=false; @@ -806,20 +806,20 @@ EditorExportPlatformBB10::~EditorExportPlatformBB10() { void register_bb10_exporter() { - EDITOR_DEF("blackberry/host_tools",""); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"blackberry/host_tools",PROPERTY_HINT_GLOBAL_DIR)); - EDITOR_DEF("blackberry/debug_token",""); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"blackberry/debug_token",PROPERTY_HINT_GLOBAL_FILE,"bar")); - EDITOR_DEF("blackberry/device_1/host",""); - EDITOR_DEF("blackberry/device_1/password",""); - EDITOR_DEF("blackberry/device_2/host",""); - EDITOR_DEF("blackberry/device_2/password",""); - EDITOR_DEF("blackberry/device_3/host",""); - EDITOR_DEF("blackberry/device_3/password",""); - EDITOR_DEF("blackberry/device_4/host",""); - EDITOR_DEF("blackberry/device_4/password",""); - EDITOR_DEF("blackberry/device_5/host",""); - EDITOR_DEF("blackberry/device_5/password",""); + EDITOR_DEF("export/blackberry/host_tools",""); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"export/blackberry/host_tools",PROPERTY_HINT_GLOBAL_DIR)); + EDITOR_DEF("export/blackberry/debug_token",""); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"export/blackberry/debug_token",PROPERTY_HINT_GLOBAL_FILE,"bar")); + EDITOR_DEF("export/blackberry/device_1/host",""); + EDITOR_DEF("export/blackberry/device_1/password",""); + EDITOR_DEF("export/blackberry/device_2/host",""); + EDITOR_DEF("export/blackberry/device_2/password",""); + EDITOR_DEF("export/blackberry/device_3/host",""); + EDITOR_DEF("export/blackberry/device_3/password",""); + EDITOR_DEF("export/blackberry/device_4/host",""); + EDITOR_DEF("export/blackberry/device_4/password",""); + EDITOR_DEF("export/blackberry/device_5/host",""); + EDITOR_DEF("export/blackberry/device_5/password",""); Ref exporter = Ref( memnew(EditorExportPlatformBB10) ); EditorImportExport::get_singleton()->add_export_platform(exporter); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index bd0ee2d420..ceb3b69f2f 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -88,7 +88,7 @@ void ColorPicker::set_color(const Color& p_color) { if (!is_inside_tree()) return; - + return; //it crashes, so returning uv_edit->get_child(0)->cast_to()->update(); w_edit->get_child(0)->cast_to()->update(); _update_color(); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index bb78dbf941..6589dfcef0 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1387,7 +1387,7 @@ void Control::set_anchor(Margin p_margin,AnchorType p_anchor, bool p_keep_margin void Control::_set_anchor(Margin p_margin,AnchorType p_anchor) { #ifdef TOOLS_ENABLED if (is_inside_tree() && get_tree()->is_editor_hint()) { - set_anchor(p_margin, p_anchor, EDITOR_DEF("2d_editor/keep_margins_when_changing_anchors", false)); + set_anchor(p_margin, p_anchor, EDITOR_DEF("editors/2d/keep_margins_when_changing_anchors", false)); } else { set_anchor(p_margin, p_anchor, false); } diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 414602fe85..6537791faf 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -551,8 +551,8 @@ void LineEdit::_notification(int p_what) { #ifdef TOOLS_ENABLED case NOTIFICATION_ENTER_TREE: { if (get_tree()->is_editor_hint()) { - cursor_set_blink_enabled(EDITOR_DEF("text_editor/caret_blink", false)); - cursor_set_blink_speed(EDITOR_DEF("text_editor/caret_blink_speed", 0.65)); + cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false)); + cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65)); if (!EditorSettings::get_singleton()->is_connected("settings_changed",this,"_editor_settings_changed")) { EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed"); @@ -1228,8 +1228,8 @@ PopupMenu *LineEdit::get_menu() const { #ifdef TOOLS_ENABLED void LineEdit::_editor_settings_changed() { - cursor_set_blink_enabled(EDITOR_DEF("text_editor/caret_blink", false)); - cursor_set_blink_speed(EDITOR_DEF("text_editor/caret_blink_speed", 0.65)); + cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false)); + cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65)); } #endif diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 89b24f2fd4..084b4edc7e 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -3233,7 +3233,7 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) { insert_data.push_back(p_id); if (p_id.track_idx==-1) { - if (bool(EDITOR_DEF("animation/confirm_insert_track",true))) { + if (bool(EDITOR_DEF("editors/animation/confirm_insert_track",true))) { //potential new key, does not exist if (insert_data.size()==1) insert_confirm->set_text(vformat(TTR("Create NEW track for %s and insert key?"),p_id.query)); diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index e3ceb20880..284d589ba7 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -1043,7 +1043,7 @@ void CodeTextEditor::_reset_zoom() { Ref font = text_editor->get_font("font"); // reset source font size to default if (font.is_valid()) { - EditorSettings::get_singleton()->set("global/source_font_size",14); + EditorSettings::get_singleton()->set("interface/source_font_size",14); font->set_size(14); } } @@ -1097,7 +1097,7 @@ void CodeTextEditor::_font_resize_timeout() { int size=font->get_size()+font_resize_val; if (size>=8 && size<=96) { - EditorSettings::get_singleton()->set("global/source_font_size",size); + EditorSettings::get_singleton()->set("interface/source_font_size",size); font->set_size(size); } @@ -1107,20 +1107,20 @@ void CodeTextEditor::_font_resize_timeout() { void CodeTextEditor::update_editor_settings() { - text_editor->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete")); - text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/scroll_past_end_of_file")); - text_editor->set_tab_size(EditorSettings::get_singleton()->get("text_editor/tab_size")); - text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/draw_tabs")); - text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/show_line_numbers")); - text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers_zero_padded")); - text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/show_line_length_guideline")); - text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/line_length_guideline_column")); - text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/syntax_highlighting")); - text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlight_all_occurrences")); - text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); - text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); - text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/show_breakpoint_gutter")); - text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); + text_editor->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete")); + text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file")); + text_editor->set_tab_size(EditorSettings::get_singleton()->get("text_editor/indent/tab_size")); + text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs")); + text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers")); + text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_numbers_zero_padded")); + text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_length_guideline")); + text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_length_guideline_column")); + text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting")); + text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences")); + text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink")); + text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed")); + text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_breakpoint_gutter")); + text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret")); } void CodeTextEditor::set_error(const String& p_error) { @@ -1137,7 +1137,7 @@ void CodeTextEditor::set_error(const String& p_error) { void CodeTextEditor::_update_font() { // FONTS - String editor_font = EDITOR_DEF("text_editor/font", ""); + String editor_font = EDITOR_DEF("text_editor/theme/font", ""); bool font_overridden = false; if (editor_font!="") { Ref fnt = ResourceLoader::load(editor_font); @@ -1158,19 +1158,19 @@ void CodeTextEditor::_on_settings_change() { // AUTO BRACE COMPLETION text_editor->set_auto_brace_completion( - EDITOR_DEF("text_editor/auto_brace_complete", true) + EDITOR_DEF("text_editor/completion/auto_brace_complete", true) ); code_complete_timer->set_wait_time( - EDITOR_DEF("text_editor/code_complete_delay",.3f) + EDITOR_DEF("text_editor/completion/code_complete_delay",.3f) ); - enable_complete_timer = EDITOR_DEF("text_editor/enable_code_completion_delay",true); + enable_complete_timer = EDITOR_DEF("text_editor/completion/enable_code_completion_delay",true); // call hint settings text_editor->set_callhint_settings( - EDITOR_DEF("text_editor/put_callhint_tooltip_below_current_line", true), - EDITOR_DEF("text_editor/callhint_tooltip_offset", Vector2()) + EDITOR_DEF("text_editor/completion/put_callhint_tooltip_below_current_line", true), + EDITOR_DEF("text_editor/completion/callhint_tooltip_offset", Vector2()) ); } @@ -1252,14 +1252,14 @@ CodeTextEditor::CodeTextEditor() { idle = memnew( Timer ); add_child(idle); idle->set_one_shot(true); - idle->set_wait_time(EDITOR_DEF("text_editor/idle_parse_delay",2)); + idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay",2)); code_complete_timer = memnew(Timer); add_child(code_complete_timer); code_complete_timer->set_one_shot(true); - enable_complete_timer = EDITOR_DEF("text_editor/enable_code_completion_delay",true); + enable_complete_timer = EDITOR_DEF("text_editor/completion/enable_code_completion_delay",true); - code_complete_timer->set_wait_time(EDITOR_DEF("text_editor/code_complete_delay",.3f)); + code_complete_timer->set_wait_time(EDITOR_DEF("text_editor/completion/code_complete_delay",.3f)); error = memnew( Label ); status_bar->add_child(error); diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index f60dfff49c..ba1298eebc 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -395,7 +395,7 @@ ConnectDialog::ConnectDialog() { make_callback = memnew( CheckButton ); make_callback->set_toggle_mode(true); - make_callback->set_pressed( EDITOR_DEF("text_editor/create_signal_callbacks",true)); + make_callback->set_pressed( EDITOR_DEF("text_editor/tools/create_signal_callbacks",true)); make_callback->set_text(TTR("Make Function")); dstm_hb->add_child(make_callback); diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index e1d21e4cd9..87f043783f 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -183,7 +183,7 @@ void CreateDialog::add_type(const String& p_type,HashMap& p_ty } - if (bool(EditorSettings::get_singleton()->get("scenetree_editor/start_create_dialog_fully_expanded"))) { + if (bool(EditorSettings::get_singleton()->get("docks/scene_tree/start_create_dialog_fully_expanded"))) { item->set_collapsed(false); } else { // don't collapse search results diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index 46eafa0266..c246506858 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -46,7 +46,7 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) { List dirs; bool ishidden; - bool show_hidden = EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"); + bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"); while(p!="") { diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index e2202bbc21..dfdd14673c 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -87,10 +87,10 @@ void EditorFileDialog::_notification(int p_what) { } else if (p_what==EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { - bool show_hidden=EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"); + bool show_hidden=EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"); if (show_hidden_files!=show_hidden) set_show_hidden_files(show_hidden); - set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("file_dialog/display_mode").operator int()); + set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int()); } } @@ -121,7 +121,7 @@ void EditorFileDialog::_unhandled_input(const InputEvent& p_event) { if (ED_IS_SHORTCUT("file_dialog/toggle_hidden_files", p_event)) { bool show=!show_hidden_files; set_show_hidden_files(show); - EditorSettings::get_singleton()->set("file_dialog/show_hidden_files",show); + EditorSettings::get_singleton()->set("filesystem/file_dialog/show_hidden_files",show); handled=true; } if (ED_IS_SHORTCUT("file_dialog/toggle_favorite", p_event)) { @@ -490,7 +490,7 @@ void EditorFileDialog::_item_dc_selected(int p_item) { void EditorFileDialog::update_file_list() { - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; Ref folder_thumbnail; Ref file_thumbnail; diff --git a/tools/editor/editor_fonts.cpp b/tools/editor/editor_fonts.cpp index 49b1ccc397..3e128e7759 100644 --- a/tools/editor/editor_fonts.cpp +++ b/tools/editor/editor_fonts.cpp @@ -122,7 +122,7 @@ void editor_register_fonts(Ref p_theme) { dfmono->set_font_ptr(_font_source_code_pro,_font_source_code_pro_size); //dfd->set_force_autohinter(true); //just looks better..i think? - MAKE_DROID_SANS(df,int(EditorSettings::get_singleton()->get("global/font_size"))*EDSCALE); + MAKE_DROID_SANS(df,int(EditorSettings::get_singleton()->get("interface/font_size"))*EDSCALE); p_theme->set_default_theme_font(df); @@ -131,9 +131,9 @@ void editor_register_fonts(Ref p_theme) { // Ref doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons")); // Ref doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons")); - MAKE_DROID_SANS(df_title,int(EDITOR_DEF("help/help_title_font_size",18))*EDSCALE); + MAKE_DROID_SANS(df_title,int(EDITOR_DEF("text_editor/help/help_title_font_size",18))*EDSCALE); - MAKE_DROID_SANS(df_doc,int(EDITOR_DEF("help/help_font_size",16))*EDSCALE); + MAKE_DROID_SANS(df_doc,int(EDITOR_DEF("text_editor/help/help_font_size",16))*EDSCALE); p_theme->set_font("doc","EditorFonts",df_doc); @@ -142,7 +142,7 @@ void editor_register_fonts(Ref p_theme) { Ref df_code; df_code.instance(); - df_code->set_size(int(EditorSettings::get_singleton()->get("global/source_font_size"))*EDSCALE); + df_code->set_size(int(EditorSettings::get_singleton()->get("interface/source_font_size"))*EDSCALE); df_code->set_font_data(dfmono); MAKE_FALLBACKS(df_code); @@ -150,7 +150,7 @@ void editor_register_fonts(Ref p_theme) { Ref df_doc_code; df_doc_code.instance(); - df_doc_code->set_size(int(EDITOR_DEF("help/help_source_font_size",14))*EDSCALE); + df_doc_code->set_size(int(EDITOR_DEF("text_editor/help/help_source_font_size",14))*EDSCALE); df_doc_code->set_font_data(dfmono); MAKE_FALLBACKS(df_doc_code); diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index a276eefbdf..5af6b154a8 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -660,7 +660,7 @@ void EditorHelp::_add_type(const String& p_type) { t="void"; bool can_ref = (t!="int" && t!="real" && t!="bool" && t!="void"); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color")); if (can_ref) class_desc->push_meta("#"+t); //class class_desc->add_text(t); @@ -719,9 +719,9 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { h_color=Color(1,1,1,1); class_desc->push_font(doc_title_font); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->add_text(TTR("Class:")+" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color")); _add_text(p_class); class_desc->pop(); class_desc->pop(); @@ -730,7 +730,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.inherits!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Inherits:")+" "); class_desc->pop(); @@ -764,7 +764,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (E->get().inherits == cd.name) { if (!found) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Inherited by:")+" "); class_desc->pop(); @@ -795,7 +795,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.brief_description!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Brief Description:")); class_desc->pop(); @@ -803,7 +803,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { //class_desc->add_newline(); class_desc->add_newline(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->push_font( doc_font ); class_desc->push_indent(1); _add_text(cd.brief_description); @@ -820,7 +820,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.properties.size()) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Members:")); class_desc->pop(); @@ -865,7 +865,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { } class_desc->push_font(doc_code_font); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); _add_text(cd.properties[i].name); if (describe) { @@ -876,7 +876,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.properties[i].brief_description!="") { class_desc->push_font(doc_font); class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color")); _add_text(cd.properties[i].description); class_desc->pop(); class_desc->pop(); @@ -903,7 +903,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { bool method_descr=false; - bool sort_methods = EditorSettings::get_singleton()->get("help/sort_functions_alphabetically"); + bool sort_methods = EditorSettings::get_singleton()->get("text_editor/help/sort_functions_alphabetically"); Vector methods; @@ -918,7 +918,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (sort_methods) methods.sort(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Public Methods:")); class_desc->pop(); @@ -951,16 +951,16 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { method_descr=true; class_desc->push_meta("@"+methods[i].name); } - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); _add_text(methods[i].name); class_desc->pop(); if (methods[i].description!="") class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(methods[i].arguments.size()?"( ":"("); class_desc->pop(); for(int j=0;jpush_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); if (j>0) class_desc->add_text(", "); _add_type(methods[i].arguments[j].type); @@ -968,7 +968,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { _add_text(methods[i].arguments[j].name); if (methods[i].arguments[j].default_value!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text("="); class_desc->pop(); _add_text(methods[i].arguments[j].default_value); @@ -978,20 +978,20 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { } if (methods[i].qualifiers.find("vararg")!=-1) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->add_text(","); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(" ... "); class_desc->pop(); class_desc->pop(); } - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(methods[i].arguments.size()?" )":")"); class_desc->pop(); if (methods[i].qualifiers!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->add_text(" "); _add_text(methods[i].qualifiers); class_desc->pop(); @@ -1013,7 +1013,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.theme_properties.size()) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("GUI Theme Items:")); class_desc->pop(); @@ -1029,7 +1029,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { theme_property_line[cd.theme_properties[i].name]=class_desc->get_line_count()-2; //gets overriden if description class_desc->push_font(doc_code_font); _add_type(cd.theme_properties[i].type); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->add_text(" "); _add_text(cd.theme_properties[i].name); class_desc->pop(); @@ -1038,7 +1038,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.theme_properties[i].description!="") { class_desc->push_font(doc_font); class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color")); _add_text(cd.theme_properties[i].description); class_desc->pop(); class_desc->pop(); @@ -1057,7 +1057,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (sort_methods) { cd.signals.sort(); } - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Signals:")); class_desc->pop(); @@ -1074,14 +1074,14 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->push_font(doc_code_font); // monofont //_add_type("void"); //class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); _add_text(cd.signals[i].name); class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(cd.signals[i].arguments.size()?"( ":"("); class_desc->pop(); for(int j=0;jpush_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); if (j>0) class_desc->add_text(", "); _add_type(cd.signals[i].arguments[j].type); @@ -1089,7 +1089,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { _add_text(cd.signals[i].arguments[j].name); if (cd.signals[i].arguments[j].default_value!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text("="); class_desc->pop(); _add_text(cd.signals[i].arguments[j].default_value); @@ -1098,13 +1098,13 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->pop(); } - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(cd.signals[i].arguments.size()?" )":")"); class_desc->pop(); class_desc->pop(); // end monofont if (cd.signals[i].description!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color")); class_desc->add_text(" "); _add_text(cd.signals[i].description); class_desc->pop(); @@ -1122,7 +1122,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.constants.size()) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Constants:")); class_desc->pop(); @@ -1136,20 +1136,20 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { constant_line[cd.constants[i].name]=class_desc->get_line_count()-2; class_desc->push_font(doc_code_font); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color")); _add_text(cd.constants[i].name); class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(" = "); class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); _add_text(cd.constants[i].value); class_desc->pop(); class_desc->pop(); if (cd.constants[i].description!="") { class_desc->push_font(doc_font); class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color")); _add_text(cd.constants[i].description); class_desc->pop(); class_desc->pop(); @@ -1167,7 +1167,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (cd.description!="") { description_line=class_desc->get_line_count()-2; - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Description:")); class_desc->pop(); @@ -1175,7 +1175,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->add_newline(); class_desc->add_newline(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->push_font( doc_font ); class_desc->push_indent(1); _add_text(cd.description); @@ -1188,7 +1188,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (property_descr) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Property Description:")); class_desc->pop(); @@ -1206,7 +1206,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { _add_type(cd.properties[i].type); class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); _add_text(cd.properties[i].name); class_desc->pop(); //color @@ -1219,11 +1219,11 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->push_font( doc_font ); class_desc->push_indent(2); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->add_text("Setter: "); class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->add_text(cd.properties[i].setter+"(value)"); class_desc->pop(); //color @@ -1238,11 +1238,11 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->push_font( doc_font ); class_desc->push_indent(2); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->add_text("Getter: "); class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->add_text(cd.properties[i].getter+"()"); class_desc->pop(); //color @@ -1254,7 +1254,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->add_newline(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->push_font( doc_font ); class_desc->push_indent(1); _add_text(cd.properties[i].description); @@ -1271,7 +1271,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (method_descr) { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Method Description:")); class_desc->pop(); @@ -1289,14 +1289,14 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { _add_type(methods[i].return_type); class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); _add_text(methods[i].name); class_desc->pop(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(methods[i].arguments.size()?"( ":"("); class_desc->pop(); for(int j=0;jpush_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); if (j>0) class_desc->add_text(", "); _add_type(methods[i].arguments[j].type); @@ -1304,7 +1304,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { _add_text(methods[i].arguments[j].name); if (methods[i].arguments[j].default_value!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text("="); class_desc->pop(); _add_text(methods[i].arguments[j].default_value); @@ -1313,12 +1313,12 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->pop(); } - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color")); class_desc->add_text(methods[i].arguments.size()?" )":")"); class_desc->pop(); if (methods[i].qualifiers!="") { - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); class_desc->add_text(" "); _add_text(methods[i].qualifiers); class_desc->pop(); @@ -1328,7 +1328,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->pop(); class_desc->add_newline(); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); class_desc->push_font( doc_font ); class_desc->push_indent(1); _add_text(methods[i].description); @@ -1408,7 +1408,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) { DocData *doc = EditorHelp::get_doc_data(); String base_path; - /*p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/text_color")); + /*p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color")); p_rt->push_font( get_font("normal","Fonts") ); p_rt->push_indent(1);*/ int pos = 0; @@ -1524,7 +1524,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) { } else if (tag.begins_with("method ")) { String m = tag.substr(7,tag.length()); - p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); p_rt->push_meta("@"+m); p_rt->add_text(m+"()"); p_rt->pop(); @@ -1534,7 +1534,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) { } else if (doc->class_list.has(tag)) { - p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); + p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color")); p_rt->push_meta("#"+tag); p_rt->add_text(tag); p_rt->pop(); @@ -1550,7 +1550,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) { } else if (tag=="i") { //use italics font - Color text_color = EditorSettings::get_singleton()->get("text_editor/text_color"); + Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"); //no italics so emphasize with color text_color.r*=1.1; text_color.g*=1.1; @@ -1808,7 +1808,7 @@ EditorHelp::EditorHelp() { VBoxContainer *vbc = this; - EDITOR_DEF("help/sort_functions_alphabetically",true); + EDITOR_DEF("text_editor/help/sort_functions_alphabetically",true); //class_list->connect("meta_clicked",this,"_class_list_select"); //class_list->set_selection_enabled(true); @@ -1816,7 +1816,7 @@ EditorHelp::EditorHelp() { { Panel *pc = memnew( Panel ); Ref style( memnew( StyleBoxFlat ) ); - style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/background_color") ); + style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/highlighting/background_color") ); pc->set_v_size_flags(SIZE_EXPAND_FILL); pc->add_style_override("panel", style); //get_stylebox("normal","TextEdit")); vbc->add_child(pc); diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index d0525af482..1245efafa1 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -1115,8 +1115,8 @@ void EditorExportPlatform::gen_export_flags(Vector &r_flags, int p_flags host="localhost"; if (p_flags&EXPORT_DUMB_CLIENT) { - int port = EditorSettings::get_singleton()->get("file_server/port"); - String passwd = EditorSettings::get_singleton()->get("file_server/password"); + int port = EditorSettings::get_singleton()->get("filesystem/file_server/port"); + String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password"); r_flags.push_back("-rfs"); r_flags.push_back(host+":"+itos(port)); if (passwd!="") { diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 2fd9216b66..bcdc2cbbf0 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -120,7 +120,7 @@ EditorNode *EditorNode::singleton=NULL; void EditorNode::_update_scene_tabs() { - bool show_rb = EditorSettings::get_singleton()->get("global/show_script_in_scene_tabs"); + bool show_rb = EditorSettings::get_singleton()->get("interface/show_script_in_scene_tabs"); scene_tabs->clear_tabs(); Ref script_icon = gui_base->get_icon("Script","EditorIcons"); @@ -391,7 +391,7 @@ void EditorNode::_notification(int p_what) { } */ - if (bool(EDITOR_DEF("resources/auto_reload_modified_images",true))) { + if (bool(EDITOR_DEF("filesystem/resources/auto_reload_modified_images",true))) { _menu_option_confirm(DEPENDENCY_LOAD_CHANGED_IMAGES,true); } @@ -407,7 +407,7 @@ void EditorNode::_notification(int p_what) { }; if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { - scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("global/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) ); + scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) ); } } @@ -434,7 +434,7 @@ void EditorNode::_fs_changed() { void EditorNode::_sources_changed(bool p_exist) { - if (p_exist && bool(EditorSettings::get_singleton()->get("import/automatic_reimport_on_sources_changed"))) { + if (p_exist && bool(EditorSettings::get_singleton()->get("filesystem/import/automatic_reimport_on_sources_changed"))) { p_exist=false; List changed_sources; @@ -555,9 +555,9 @@ void EditorNode::save_resource_in_path(const Ref& p_resource,const Str editor_data.apply_changes_in_editors(); int flg=0; - if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources")) + if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) + //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; String path = GlobalConfig::get_singleton()->localize_path(p_path); @@ -914,7 +914,7 @@ void EditorNode::_save_scene_with_preview(String p_file) { save.step(TTR("Creating Thumbnail"),3); #if 0 Image img = VS::get_singleton()->viewport_texture(scree_capture(viewport); - int preview_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");; + int preview_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");; preview_size*=EDSCALE; int width,height; if (img.get_width() > preview_size && img.get_width() >= img.get_height()) { @@ -1003,9 +1003,9 @@ void EditorNode::_save_scene(String p_file, int idx) { sdata->set_import_metadata(editor_data.get_edited_scene_import_metadata(idx)); int flg=0; - if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources")) + if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) + //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; flg|=ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; @@ -1667,7 +1667,7 @@ void EditorNode::_edit_current() { if (main_plugin) { // special case if use of external editor is true - if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor"))){ + if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))){ main_plugin->edit(current_obj); } @@ -1891,7 +1891,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { } - if (bool(EDITOR_DEF("run/auto_save_before_running",true))) { + if (bool(EDITOR_DEF("run/auto_save/save_before_running",true))) { if (unsaved_cache) { @@ -2688,7 +2688,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } break; case RUN_PLAY_NATIVE: { - bool autosave = EDITOR_DEF("run/auto_save_before_running",true); + bool autosave = EDITOR_DEF("run/auto_save/save_before_running",true); if (autosave) { _menu_option_confirm(FILE_SAVE_ALL_SCENES, false); } @@ -5409,7 +5409,7 @@ EditorNode::EditorNode() { bool use_single_dock_column = false; { - int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode"); + int dpi_mode = EditorSettings::get_singleton()->get("interface/hidpi_mode"); if (dpi_mode==0) { editor_set_scale( OS::get_singleton()->get_screen_dpi(0) > 150 && OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x>2000 ? 2.0 : 1.0 ); @@ -5428,9 +5428,9 @@ EditorNode::EditorNode() { ResourceLoader::set_abort_on_missing_resources(false); - FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); - EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); - EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("file_dialog/display_mode").operator int()); + FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files")); + EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files")); + EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int()); ResourceLoader::set_error_notify_func(this,_load_error_notify); ResourceLoader::set_dependency_error_notify_func(this,_dependency_error_report); @@ -5664,7 +5664,7 @@ EditorNode::EditorNode() { scene_tabs=memnew( Tabs ); scene_tabs->add_tab("unsaved"); scene_tabs->set_tab_align(Tabs::ALIGN_CENTER); - scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("global/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) ); + scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) ); scene_tabs->connect("tab_changed",this,"_scene_tab_changed"); scene_tabs->connect("right_button_pressed",this,"_scene_tab_script_edited"); scene_tabs->connect("tab_close", this, "_scene_tab_closed"); @@ -6260,7 +6260,7 @@ EditorNode::EditorNode() { scenes_dock = memnew( FileSystemDock(this) ); scenes_dock->set_name(TTR("FileSystem")); - scenes_dock->set_display_mode(int(EditorSettings::get_singleton()->get("filesystem_dock/display_mode"))); + scenes_dock->set_display_mode(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode"))); if (use_single_dock_column) { dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(scenes_dock); diff --git a/tools/editor/editor_resource_preview.cpp b/tools/editor/editor_resource_preview.cpp index c43aea06dd..76ae53d821 100644 --- a/tools/editor/editor_resource_preview.cpp +++ b/tools/editor/editor_resource_preview.cpp @@ -154,7 +154,7 @@ Ref EditorResourcePreview::_generate_preview(const QueueItem& p_item,co // cache the preview in case it's a resource on disk if (generated.is_valid()) { //print_line("was generated"); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; //wow it generated a preview... save cache ResourceSaver::save(cache_base+".png",generated); @@ -207,7 +207,7 @@ void EditorResourcePreview::_thread() { //print_line("pop from queue "+item.path); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp index 2a0212f29e..7d79412b3b 100644 --- a/tools/editor/editor_run.cpp +++ b/tools/editor/editor_run.cpp @@ -63,7 +63,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List args.push_back("-debugnav"); } - int screen = EditorSettings::get_singleton()->get("game_window_placement/screen"); + int screen = EditorSettings::get_singleton()->get("run/window_placement/screen"); if (screen==0) { screen=OS::get_singleton()->get_current_screen(); @@ -90,7 +90,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List } - int window_placement=EditorSettings::get_singleton()->get("game_window_placement/rect"); + int window_placement=EditorSettings::get_singleton()->get("run/window_placement/rect"); switch(window_placement) { case 0: { // default @@ -104,7 +104,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List args.push_back(itos(pos.x)+"x"+itos(pos.y)); } break; case 2: { // custom pos - Vector2 pos = EditorSettings::get_singleton()->get("game_window_placement/rect_custom_position"); + Vector2 pos = EditorSettings::get_singleton()->get("run/window_placement/rect_custom_position"); pos+=screen_rect.pos; args.push_back("-p"); args.push_back(itos(pos.x)+"x"+itos(pos.y)); diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 2724bd7d3e..ef2aaeda53 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* http:/www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ @@ -123,8 +123,10 @@ bool EditorSettings::_get(const StringName& p_name,Variant &r_ret) const { } const VariantContainer *v=props.getptr(p_name); - if (!v) + if (!v) { + //print_line("WARNING NOT FOUND: "+String(p_name)); return false; + } r_ret = v->variant; return true; } @@ -323,20 +325,13 @@ void EditorSettings::create() { // path at least is validated, so validate config file - config_file_path = config_path+"/"+config_dir+"/editor_settings.tres"; + config_file_path = config_path+"/"+config_dir+"/editor_config.tres"; String open_path = config_file_path; - if (!dir->file_exists("editor_settings.tres")) { + if (!dir->file_exists("editor_config.tres")) { - open_path = config_path+"/"+config_dir+"/editor_settings.xml"; - - if (!dir->file_exists("editor_settings.xml")) { - - memdelete(dir); - WARN_PRINT("Config file does not exist, creating."); - goto fail; - } + goto fail; } memdelete(dir); @@ -402,9 +397,9 @@ String EditorSettings::get_settings_path() const { void EditorSettings::setup_language() { - String lang = get("global/editor_language"); + String lang = get("interface/editor_language"); if (lang=="en") - return; //none to do + return;//none to do for(int i=0;iget_locale()==lang) { @@ -506,158 +501,159 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { best="en"; } - set("global/editor_language",best); - hints["global/editor_language"]=PropertyInfo(Variant::STRING,"global/editor_language",PROPERTY_HINT_ENUM,lang_hint,PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/editor_language",best); + hints["interface/editor_language"]=PropertyInfo(Variant::STRING,"interface/editor_language",PROPERTY_HINT_ENUM,lang_hint,PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); } - set("global/hidpi_mode",0); - hints["global/hidpi_mode"]=PropertyInfo(Variant::INT,"global/hidpi_mode",PROPERTY_HINT_ENUM,"Auto,VeryLoDPI,LoDPI,MidDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); - set("global/show_script_in_scene_tabs",false); - set("global/font_size",14); - hints["global/font_size"]=PropertyInfo(Variant::INT,"global/font_size",PROPERTY_HINT_RANGE,"10,40,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); - set("global/source_font_size",14); - hints["global/source_font_size"]=PropertyInfo(Variant::INT,"global/source_font_size",PROPERTY_HINT_RANGE,"8,96,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); - set("global/custom_font",""); - hints["global/custom_font"]=PropertyInfo(Variant::STRING,"global/custom_font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); - set("global/custom_theme",""); - hints["global/custom_theme"]=PropertyInfo(Variant::STRING,"global/custom_theme",PROPERTY_HINT_GLOBAL_FILE,"*.res,*.tres,*.theme",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/hidpi_mode",0); + hints["interface/hidpi_mode"]=PropertyInfo(Variant::INT,"interface/hidpi_mode",PROPERTY_HINT_ENUM,"Auto,VeryLoDPI,LoDPI,MidDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/show_script_in_scene_tabs",false); + set("interface/font_size",14); + hints["interface/font_size"]=PropertyInfo(Variant::INT,"interface/font_size",PROPERTY_HINT_RANGE,"10,40,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/source_font_size",14); + hints["interface/source_font_size"]=PropertyInfo(Variant::INT,"interface/source_font_size",PROPERTY_HINT_RANGE,"8,96,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/custom_font",""); + hints["interface/custom_font"]=PropertyInfo(Variant::STRING,"interface/custom_font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/custom_theme",""); + hints["interface/custom_theme"]=PropertyInfo(Variant::STRING,"interface/custom_theme",PROPERTY_HINT_GLOBAL_FILE,"*.res,*.tres,*.theme",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); - set("global/autoscan_project_path",""); - hints["global/autoscan_project_path"]=PropertyInfo(Variant::STRING,"global/autoscan_project_path",PROPERTY_HINT_GLOBAL_DIR); - set("global/default_project_path",""); - hints["global/default_project_path"]=PropertyInfo(Variant::STRING,"global/default_project_path",PROPERTY_HINT_GLOBAL_DIR); - set("global/default_project_export_path",""); + set("filesystem/directories/autoscan_project_path",""); + hints["filesystem/directories/autoscan_project_path"]=PropertyInfo(Variant::STRING,"filesystem/directories/autoscan_project_path",PROPERTY_HINT_GLOBAL_DIR); + set("filesystem/directories/default_project_path",""); + hints["filesystem/directories/default_project_path"]=PropertyInfo(Variant::STRING,"filesystem/directories/default_project_path",PROPERTY_HINT_GLOBAL_DIR); + set("filesystem/directories/default_project_export_path",""); hints["global/default_project_export_path"]=PropertyInfo(Variant::STRING,"global/default_project_export_path",PROPERTY_HINT_GLOBAL_DIR); - set("global/show_script_in_scene_tabs",false); + set("interface/show_script_in_scene_tabs",false); - set("text_editor/color_theme","Default"); - hints["text_editor/color_theme"]=PropertyInfo(Variant::STRING,"text_editor/color_theme",PROPERTY_HINT_ENUM,"Default"); + set("text_editor/theme/color_theme","Default"); + hints["text_editor/theme/color_theme"]=PropertyInfo(Variant::STRING,"text_editor/theme/color_theme",PROPERTY_HINT_ENUM,"Default"); + + set("text_editor/theme/line_spacing",4); + _load_default_text_editor_theme(); - set("text_editor/syntax_highlighting", true); + set("text_editor/highlighting/syntax_highlighting", true); - set("text_editor/highlight_all_occurrences", true); - set("text_editor/scroll_past_end_of_file", false); + set("text_editor/highlighting/highlight_all_occurrences", true); + set("text_editor/cursor/scroll_past_end_of_file", false); - set("text_editor/tab_size", 4); - hints["text_editor/tab_size"]=PropertyInfo(Variant::INT,"text_editor/tab_size",PROPERTY_HINT_RANGE,"1, 64, 1"); // size of 0 crashes. - set("text_editor/draw_tabs", true); + set("text_editor/indent/tab_size", 4); + hints["text_editor/indent/tab_size"]=PropertyInfo(Variant::INT,"text_editor/indent/tab_size",PROPERTY_HINT_RANGE,"1, 64, 1"); // size of 0 crashes. + set("text_editor/indent/draw_tabs", true); - set("text_editor/line_numbers_zero_padded", false); + set("text_editor/line_numbers/show_line_numbers", true); + set("text_editor/line_numbers/line_numbers_zero_padded", false); + set("text_editor/line_numbers/show_breakpoint_gutter", true); + set("text_editor/line_numbers/show_line_length_guideline", false); + set("text_editor/line_numbers/line_length_guideline_column", 80); + hints["text_editor/line_numbers/line_length_guideline_column"]=PropertyInfo(Variant::INT,"text_editor/line_numbers/line_length_guideline_column",PROPERTY_HINT_RANGE,"20, 160, 10"); - set("text_editor/show_line_numbers", true); - set("text_editor/show_breakpoint_gutter", true); + set("text_editor/files/trim_trailing_whitespace_on_save", false); + set("text_editor/completion/idle_parse_delay",2); + set("text_editor/tools/create_signal_callbacks",true); + set("text_editor/files/autosave_interval_secs",0); - set("text_editor/show_line_length_guideline", false); - set("text_editor/line_length_guideline_column", 80); - hints["text_editor/line_length_guideline_column"]=PropertyInfo(Variant::INT,"text_editor/line_length_guideline_column",PROPERTY_HINT_RANGE,"20, 160, 10"); + set("text_editor/cursor/block_caret", false); + set("text_editor/cursor/caret_blink", false); + set("text_editor/cursor/caret_blink_speed", 0.65); + hints["text_editor/cursor/caret_blink_speed"]=PropertyInfo(Variant::REAL,"text_editor/cursor/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1, 10, 0.1"); - set("text_editor/trim_trailing_whitespace_on_save", false); - set("text_editor/idle_parse_delay",2); - set("text_editor/create_signal_callbacks",true); - set("text_editor/autosave_interval_secs",0); - - set("text_editor/block_caret", false); - set("text_editor/caret_blink", false); - set("text_editor/caret_blink_speed", 0.65); - hints["text_editor/caret_blink_speed"]=PropertyInfo(Variant::REAL,"text_editor/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1, 10, 0.1"); - - set("text_editor/font",""); - hints["text_editor/font"]=PropertyInfo(Variant::STRING,"text_editor/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt"); - set("text_editor/auto_brace_complete", false); - set("text_editor/restore_scripts_on_load",true); + set("text_editor/theme/font",""); + hints["text_editor/theme/font"]=PropertyInfo(Variant::STRING,"text_editor/theme/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt"); + set("text_editor/completion/auto_brace_complete", false); + set("text_editor/files/restore_scripts_on_load",true); - //set("scenetree_editor/display_old_action_buttons",false); - set("scenetree_editor/start_create_dialog_fully_expanded",false); - set("scenetree_editor/draw_relationship_lines",false); - set("scenetree_editor/relationship_line_color",Color::html("464646")); + //set("docks/scene_tree/display_old_action_buttons",false); + set("docks/scene_tree/start_create_dialog_fully_expanded",false); + set("docks/scene_tree/draw_relationship_lines",false); + set("docks/scene_tree/relationship_line_color",Color::html("464646")); - set("grid_map/pick_distance", 5000.0); + set("editors/grid_map/pick_distance", 5000.0); - set("3d_editor/grid_color",Color(0,1,0,0.2)); - hints["3d_editor/grid_color"]=PropertyInfo(Variant::COLOR,"3d_editor/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); + set("editors/3d/grid_color",Color(0,1,0,0.2)); + hints["editors/3d/grid_color"]=PropertyInfo(Variant::COLOR,"editors/3d/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); - set("3d_editor/default_fov",45.0); - set("3d_editor/default_z_near",0.1); - set("3d_editor/default_z_far",500.0); + set("editors/3d/default_fov",45.0); + set("editors/3d/default_z_near",0.1); + set("editors/3d/default_z_far",500.0); - set("3d_editor/navigation_scheme",0); - hints["3d_editor/navigation_scheme"]=PropertyInfo(Variant::INT,"3d_editor/navigation_scheme",PROPERTY_HINT_ENUM,"Godot,Maya,Modo"); - set("3d_editor/zoom_style",0); - hints["3d_editor/zoom_style"]=PropertyInfo(Variant::INT,"3d_editor/zoom_style",PROPERTY_HINT_ENUM,"Vertical, Horizontal"); - set("3d_editor/orbit_modifier",0); - hints["3d_editor/orbit_modifier"]=PropertyInfo(Variant::INT,"3d_editor/orbit_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl"); - set("3d_editor/pan_modifier",1); - hints["3d_editor/pan_modifier"]=PropertyInfo(Variant::INT,"3d_editor/pan_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl"); - set("3d_editor/zoom_modifier",4); - hints["3d_editor/zoom_modifier"]=PropertyInfo(Variant::INT,"3d_editor/zoom_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl"); - set("3d_editor/emulate_numpad",false); - set("3d_editor/emulate_3_button_mouse", false); + set("editors/3d/navigation_scheme",0); + hints["editors/3d/navigation_scheme"]=PropertyInfo(Variant::INT,"editors/3d/navigation_scheme",PROPERTY_HINT_ENUM,"Godot,Maya,Modo"); + set("editors/3d/zoom_style",0); + hints["editors/3d/zoom_style"]=PropertyInfo(Variant::INT,"editors/3d/zoom_style",PROPERTY_HINT_ENUM,"Vertical, Horizontal"); + set("editors/3d/orbit_modifier",0); + hints["editors/3d/orbit_modifier"]=PropertyInfo(Variant::INT,"editors/3d/orbit_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl"); + set("editors/3d/pan_modifier",1); + hints["editors/3d/pan_modifier"]=PropertyInfo(Variant::INT,"editors/3d/pan_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl"); + set("editors/3d/zoom_modifier",4); + hints["editors/3d/zoom_modifier"]=PropertyInfo(Variant::INT,"editors/3d/zoom_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl"); + set("editors/3d/emulate_numpad",false); + set("editors/3d/emulate_3_button_mouse", false); - set("2d_editor/bone_width",5); - set("2d_editor/bone_color1",Color(1.0,1.0,1.0,0.9)); - set("2d_editor/bone_color2",Color(0.75,0.75,0.75,0.9)); - set("2d_editor/bone_selected_color",Color(0.9,0.45,0.45,0.9)); - set("2d_editor/bone_ik_color",Color(0.9,0.9,0.45,0.9)); + set("editors/2d/bone_width",5); + set("editors/2d/bone_color1",Color(1.0,1.0,1.0,0.9)); + set("editors/2d/bone_color2",Color(0.75,0.75,0.75,0.9)); + set("editors/2d/bone_selected_color",Color(0.9,0.45,0.45,0.9)); + set("editors/2d/bone_ik_color",Color(0.9,0.9,0.45,0.9)); - set("2d_editor/keep_margins_when_changing_anchors", false); + set("editors/2d/keep_margins_when_changing_anchors", false); - set("game_window_placement/rect",0); - hints["game_window_placement/rect"]=PropertyInfo(Variant::INT,"game_window_placement/rect",PROPERTY_HINT_ENUM,"Default,Centered,Custom Position,Force Maximized,Force Full Screen"); + set("run/window_placement/rect",0); + hints["run/window_placement/rect"]=PropertyInfo(Variant::INT,"run/window_placement/rect",PROPERTY_HINT_ENUM,"Default,Centered,Custom Position,Force Maximized,Force Full Screen"); String screen_hints=TTR("Default (Same as Editor)"); for(int i=0;iget_screen_count();i++) { screen_hints+=",Monitor "+itos(i+1); } - set("game_window_placement/rect_custom_position",Vector2()); - set("game_window_placement/screen",0); - hints["game_window_placement/screen"]=PropertyInfo(Variant::INT,"game_window_placement/screen",PROPERTY_HINT_ENUM,screen_hints); + set("run/window_placement/rect_custom_position",Vector2()); + set("run/window_placement/screen",0); + hints["run/window_placement/screen"]=PropertyInfo(Variant::INT,"run/window_placement/screen",PROPERTY_HINT_ENUM,screen_hints); - set("on_save/compress_binary_resources",true); - set("on_save/save_modified_external_resources",true); - //set("on_save/save_paths_as_relative",false); - //set("on_save/save_paths_without_extension",false); + set("filesystem/on_save/compress_binary_resources",true); + set("filesystem/on_save/save_modified_external_resources",true); + //set("filesystem/on_save/save_paths_as_relative",false); + //set("filesystem/on_save/save_paths_without_extension",false); - set("text_editor/create_signal_callbacks",true); + set("text_editor/tools/create_signal_callbacks",true); - set("file_dialog/show_hidden_files", false); - set("file_dialog/display_mode", 0); - hints["file_dialog/display_mode"]=PropertyInfo(Variant::INT,"file_dialog/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List"); - set("file_dialog/thumbnail_size", 64); - hints["file_dialog/thumbnail_size"]=PropertyInfo(Variant::INT,"file_dialog/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16"); + set("filesystem/file_dialog/show_hidden_files", false); + set("filesystem/file_dialog/display_mode", 0); + hints["filesystem/file_dialog/display_mode"]=PropertyInfo(Variant::INT,"filesystem/file_dialog/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List"); + set("filesystem/file_dialog/thumbnail_size", 64); + hints["filesystem/file_dialog/thumbnail_size"]=PropertyInfo(Variant::INT,"filesystem/file_dialog/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16"); - set("filesystem_dock/display_mode", 0); - hints["filesystem_dock/display_mode"]=PropertyInfo(Variant::INT,"filesystem_dock/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List"); - set("filesystem_dock/thumbnail_size", 64); - hints["filesystem_dock/thumbnail_size"]=PropertyInfo(Variant::INT,"filesystem_dock/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16"); + set("docks/filesystem/display_mode", 0); + hints["docks/filesystem/display_mode"]=PropertyInfo(Variant::INT,"docks/filesystem/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List"); + set("docks/filesystem/thumbnail_size", 64); + hints["docks/filesystem/thumbnail_size"]=PropertyInfo(Variant::INT,"docks/filesystem/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16"); - set("animation/autorename_animation_tracks",true); - set("animation/confirm_insert_track",true); + set("editors/animation/autorename_animation_tracks",true); + set("editors/animation/confirm_insert_track",true); - set("property_editor/texture_preview_width",48); - set("property_editor/auto_refresh_interval",0.3); - set("help/doc_path",""); + set("docks/property_editor/texture_preview_width",48); + set("docks/property_editor/auto_refresh_interval",0.3); + set("text_editor/help/doc_path",""); - set("import/ask_save_before_reimport",false); + set("filesystem/import/ask_save_before_reimport",false); - set("import/pvrtc_texture_tool",""); + set("filesystem/import/pvrtc_texture_tool",""); #ifdef WINDOWS_ENABLED - hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"*.exe"); + hints["filesystem/import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"*.exe"); #else hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,""); #endif - // TODO: Rename to "import/pvrtc_fast_conversion" to match other names? - set("PVRTC/fast_conversion",false); + // TODO: Rename to "filesystem/import/pvrtc_fast_conversion" to match other names? + set("filesystem/import/pvrtc_fast_conversion",false); - set("run/auto_save_before_running",true); - set("resources/save_compressed_resources",true); - set("resources/auto_reload_modified_images",true); + set("run/auto_save/save_before_running",true); + set("filesystem/resources/save_compressed_resources",true); + set("filesystem/resources/auto_reload_modified_images",true); - set("import/automatic_reimport_on_sources_changed",true); + set("filesystem/import/automatic_reimport_on_sources_changed",true); if (p_extra_config.is_valid()) { @@ -691,34 +687,34 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { } void EditorSettings::_load_default_text_editor_theme() { - set("text_editor/background_color",Color::html("3b000000")); - set("text_editor/completion_background_color", Color::html("2C2A32")); - set("text_editor/completion_selected_color", Color::html("434244")); - set("text_editor/completion_existing_color", Color::html("21dfdfdf")); - set("text_editor/completion_scroll_color", Color::html("ffffff")); - set("text_editor/completion_font_color", Color::html("aaaaaa")); - set("text_editor/caret_color",Color::html("aaaaaa")); - set("text_editor/caret_background_color", Color::html("000000")); - set("text_editor/line_number_color",Color::html("66aaaaaa")); - set("text_editor/text_color",Color::html("aaaaaa")); - set("text_editor/text_selected_color",Color::html("000000")); - set("text_editor/keyword_color",Color::html("ffffb3")); - set("text_editor/base_type_color",Color::html("a4ffd4")); - set("text_editor/engine_type_color",Color::html("83d3ff")); - set("text_editor/function_color",Color::html("66a2ce")); - set("text_editor/member_variable_color",Color::html("e64e59")); - set("text_editor/comment_color",Color::html("676767")); - set("text_editor/string_color",Color::html("ef6ebe")); - set("text_editor/number_color",Color::html("EB9532")); - set("text_editor/symbol_color",Color::html("badfff")); - set("text_editor/selection_color",Color::html("7b5dbe")); - set("text_editor/brace_mismatch_color",Color(1,0.2,0.2)); - set("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15)); - set("text_editor/mark_color", Color(1.0,0.4,0.4,0.4)); - set("text_editor/breakpoint_color", Color(0.8,0.8,0.4,0.2)); - set("text_editor/word_highlighted_color",Color(0.8,0.9,0.9,0.15)); - set("text_editor/search_result_color",Color(0.05,0.25,0.05,1)); - set("text_editor/search_result_border_color",Color(0.1,0.45,0.1,1)); + set("text_editor/highlighting/background_color",Color::html("3b000000")); + set("text_editor/highlighting/completion_background_color", Color::html("2C2A32")); + set("text_editor/highlighting/completion_selected_color", Color::html("434244")); + set("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")); + set("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")); + set("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")); + set("text_editor/highlighting/caret_color",Color::html("aaaaaa")); + set("text_editor/highlighting/caret_background_color", Color::html("000000")); + set("text_editor/highlighting/line_number_color",Color::html("66aaaaaa")); + set("text_editor/highlighting/text_color",Color::html("aaaaaa")); + set("text_editor/highlighting/text_selected_color",Color::html("000000")); + set("text_editor/highlighting/keyword_color",Color::html("ffffb3")); + set("text_editor/highlighting/base_type_color",Color::html("a4ffd4")); + set("text_editor/highlighting/engine_type_color",Color::html("83d3ff")); + set("text_editor/highlighting/function_color",Color::html("66a2ce")); + set("text_editor/highlighting/member_variable_color",Color::html("e64e59")); + set("text_editor/highlighting/comment_color",Color::html("676767")); + set("text_editor/highlighting/string_color",Color::html("ef6ebe")); + set("text_editor/highlighting/number_color",Color::html("EB9532")); + set("text_editor/highlighting/symbol_color",Color::html("badfff")); + set("text_editor/highlighting/selection_color",Color::html("7b5dbe")); + set("text_editor/highlighting/brace_mismatch_color",Color(1,0.2,0.2)); + set("text_editor/highlighting/current_line_color",Color(0.3,0.5,0.8,0.15)); + set("text_editor/highlighting/mark_color", Color(1.0,0.4,0.4,0.4)); + set("text_editor/highlighting/breakpoint_color", Color(0.8,0.8,0.4,0.2)); + set("text_editor/highlighting/word_highlighted_color",Color(0.8,0.9,0.9,0.15)); + set("text_editor/highlighting/search_result_color",Color(0.05,0.25,0.05,1)); + set("text_editor/highlighting/search_result_border_color",Color(0.1,0.45,0.1,1)); } void EditorSettings::notify_changes() { @@ -854,16 +850,16 @@ void EditorSettings::list_text_editor_themes() { d->list_dir_end(); memdelete(d); } - add_property_hint(PropertyInfo(Variant::STRING,"text_editor/color_theme",PROPERTY_HINT_ENUM,themes)); + add_property_hint(PropertyInfo(Variant::STRING,"text_editor/theme/color_theme",PROPERTY_HINT_ENUM,themes)); } void EditorSettings::load_text_editor_theme() { - if (get("text_editor/color_theme") == "Default") { + if (get("text_editor/theme/color_theme") == "Default") { _load_default_text_editor_theme(); // sorry for "Settings changed" console spam return; } - String theme_path = get_settings_path() + "/text_editor_themes/" + get("text_editor/color_theme") + ".tet"; + String theme_path = get_settings_path() + "/text_editor_themes/" + get("text_editor/theme/color_theme") + ".tet"; Ref cf = memnew( ConfigFile ); Error err = cf->load(theme_path); @@ -913,7 +909,7 @@ bool EditorSettings::import_text_editor_theme(String p_file) { bool EditorSettings::save_text_editor_theme() { - String p_file = get("text_editor/color_theme"); + String p_file = get("text_editor/theme/color_theme"); if (p_file.get_file().to_lower() == "default") { return false; @@ -937,7 +933,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) { String theme_name = p_file.substr(0, p_file.length() - 4).get_file(); if (p_file.get_base_dir() == get_settings_path() + "/text_editor_themes") { - set("text_editor/color_theme", theme_name); + set("text_editor/theme/color_theme", theme_name); load_text_editor_theme(); } return true; diff --git a/tools/editor/editor_themes.cpp b/tools/editor/editor_themes.cpp index fd71c80a4f..56654cad7a 100644 --- a/tools/editor/editor_themes.cpp +++ b/tools/editor/editor_themes.cpp @@ -62,12 +62,12 @@ Ref create_custom_theme() { Ref theme; - String custom_theme = EditorSettings::get_singleton()->get("global/custom_theme"); + String custom_theme = EditorSettings::get_singleton()->get("interface/custom_theme"); if (custom_theme!="") { theme = ResourceLoader::load(custom_theme); } - String global_font = EditorSettings::get_singleton()->get("global/custom_font"); + String global_font = EditorSettings::get_singleton()->get("interface/custom_font"); if (global_font!="") { Ref fnt = ResourceLoader::load(global_font); if (fnt.is_valid()) { diff --git a/tools/editor/fileserver/editor_file_server.cpp b/tools/editor/fileserver/editor_file_server.cpp index 727deef0b8..d640b0ad1d 100644 --- a/tools/editor/fileserver/editor_file_server.cpp +++ b/tools/editor/fileserver/editor_file_server.cpp @@ -321,8 +321,8 @@ void EditorFileServer::start() { stop(); - port=EDITOR_DEF("file_server/port",6010); - password=EDITOR_DEF("file_server/password",""); + port=EDITOR_DEF("filesystem/file_server/port",6010); + password=EDITOR_DEF("filesystem/file_server/password",""); cmd=CMD_ACTIVATE; } @@ -346,8 +346,8 @@ EditorFileServer::EditorFileServer() { cmd=CMD_NONE; thread=Thread::create(_thread_start,this); - EDITOR_DEF("file_server/port",6010); - EDITOR_DEF("file_server/password",""); + EDITOR_DEF("filesystem/file_server/port",6010); + EDITOR_DEF("filesystem/file_server/password",""); } EditorFileServer::~EditorFileServer() { diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index d8dcb092db..cea7a6ec83 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -201,7 +201,7 @@ void FileSystemDock::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - int new_mode = int(EditorSettings::get_singleton()->get("filesystem_dock/display_mode")); + int new_mode = int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode")); if (new_mode != display_mode) { set_display_mode(new_mode); @@ -323,7 +323,7 @@ void FileSystemDock::_change_file_display() { button_display_mode->set_icon( get_icon("FileList","EditorIcons")); } - EditorSettings::get_singleton()->set("filesystem_dock/display_mode", display_mode); + EditorSettings::get_singleton()->set("docks/filesystem/display_mode", display_mode); _update_files(true); } @@ -397,7 +397,7 @@ void FileSystemDock::_update_files(bool p_keep_selection) { if (!efd) return; - int thumbnail_size = EditorSettings::get_singleton()->get("filesystem_dock/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("docks/filesystem/thumbnail_size"); thumbnail_size*=EDSCALE; Ref folder_thumbnail; Ref file_thumbnail; diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index 23e2f2e712..4cc396a57b 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -375,9 +375,9 @@ void AnimationPlayerEditor::_animation_load() { void AnimationPlayerEditor::_animation_save_in_path(const Ref& p_resource, const String& p_path) { int flg = 0; - if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources")) + if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg |= ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) + //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) // flg |= ResourceSaver::FLAG_RELATIVE_PATHS; String path = GlobalConfig::get_singleton()->localize_path(p_path); diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 04b8f7ce65..5fa0d88ca5 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -1317,7 +1317,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { { bone_ik_list.clear(); float closest_dist=1e20; - int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width"); + int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width"); for(Map::Element *E=bone_list.front();E;E=E->next()) { if (E->get().from == E->get().to) @@ -2117,11 +2117,11 @@ void CanvasItemEditor::_viewport_draw() { } if (skeleton_show_bones) { - int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width"); - Color bone_color1 = EditorSettings::get_singleton()->get("2d_editor/bone_color1"); - Color bone_color2 = EditorSettings::get_singleton()->get("2d_editor/bone_color2"); - Color bone_ik_color = EditorSettings::get_singleton()->get("2d_editor/bone_ik_color"); - Color bone_selected_color = EditorSettings::get_singleton()->get("2d_editor/bone_selected_color"); + int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width"); + Color bone_color1 = EditorSettings::get_singleton()->get("editors/2dbone_color1"); + Color bone_color2 = EditorSettings::get_singleton()->get("editors/2dbone_color2"); + Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2dbone_ik_color"); + Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2dbone_selected_color"); for(Map::Element*E=bone_list.front();E;E=E->next()) { diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp index 0f82f8eefc..e6e8d94d78 100644 --- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -122,7 +122,7 @@ bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) { Vector poly = node->get_polygon(); //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8); + real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); switch(mode) { diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp index 8420f04eef..5ac4023177 100644 --- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp @@ -147,7 +147,7 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const Vector poly = node->get_polygon(); //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8); + real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); switch(mode) { diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp index a5f447cfd9..a981089cc5 100644 --- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -151,8 +151,8 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref p_library, VS::ViewportRect vr; vr.x=0; vr.y=0; - vr.width=EditorSettings::get_singleton()->get("grid_map/preview_size"); - vr.height=EditorSettings::get_singleton()->get("grid_map/preview_size"); + vr.width=EditorSettings::get_singleton()->get("editors/grid_map/preview_size"); + vr.height=EditorSettings::get_singleton()->get("editors/grid_map/preview_size"); VS::get_singleton()->viewport_set_rect(vp,vr); VS::get_singleton()->viewport_set_as_render_target(vp,true); VS::get_singleton()->viewport_set_render_target_update_mode(vp,VS::RENDER_TARGET_UPDATE_ALWAYS); @@ -343,7 +343,7 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible){ MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) { - EDITOR_DEF("grid_map/preview_size",64); + EDITOR_DEF("editors/grid_map/preview_size",64); theme_editor = memnew( MeshLibraryEditor(p_node) ); p_node->get_viewport()->add_child(theme_editor); diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp index c07eacf69e..5a41f7e9e8 100644 --- a/tools/editor/plugins/editor_preview_plugins.cpp +++ b/tools/editor/plugins/editor_preview_plugins.cpp @@ -65,7 +65,7 @@ Ref EditorTexturePreviewPlugin::generate(const RES& p_from) { img.clear_mipmaps(); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; if (img.is_compressed()) { if (img.decompress()!=OK) @@ -141,7 +141,7 @@ Ref EditorBitmapPreviewPlugin::generate(const RES& p_from) { Image img(bm->get_size().width,bm->get_size().height,0,Image::FORMAT_L8,data); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; if (img.is_compressed()) { if (img.decompress()!=OK) @@ -264,7 +264,7 @@ Ref EditorMaterialPreviewPlugin::generate(const RES& p_from) { //print_line("captured!"); VS::get_singleton()->mesh_surface_set_material(sphere,0,RID()); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; img.resize(thumbnail_size,thumbnail_size); @@ -433,17 +433,17 @@ Ref EditorScriptPreviewPlugin::generate(const RES& p_from) { int line = 0; int col=0; - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; Image img(thumbnail_size,thumbnail_size,0,Image::FORMAT_RGBA8); - Color bg_color = EditorSettings::get_singleton()->get("text_editor/background_color"); + Color bg_color = EditorSettings::get_singleton()->get("text_editor/highlighting/background_color"); bg_color.a=1.0; - Color keyword_color = EditorSettings::get_singleton()->get("text_editor/keyword_color"); - Color text_color = EditorSettings::get_singleton()->get("text_editor/text_color"); - Color symbol_color = EditorSettings::get_singleton()->get("text_editor/symbol_color"); + Color keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"); + Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"); + Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"); for(int i=0;i EditorSamplePreviewPlugin::generate(const RES& p_from) { ERR_FAIL_COND_V(smp.is_null(),Ref()); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; DVector img; int w = thumbnail_size; @@ -841,7 +841,7 @@ Ref EditorMeshPreviewPlugin::generate(const RES& p_from) { //print_line("captured!"); VS::get_singleton()->instance_set_base(mesh_instance,RID()); - int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size"); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size*=EDSCALE; img.resize(thumbnail_size,thumbnail_size); diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp index b468c1da7b..9d49cccac4 100644 --- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -132,7 +132,7 @@ bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) { Vector poly = Variant(node->get_occluder_polygon()->get_polygon()); //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8); + real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); switch(mode) { diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp index 031fca0b7b..d08c89c1ef 100644 --- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -148,7 +148,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) { //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8); + real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); switch(mode) { diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp index 2a5dfbdb80..85bd751d23 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.cpp +++ b/tools/editor/plugins/path_2d_editor_plugin.cpp @@ -86,7 +86,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) { : node->get_global_transform().affine_inverse().xform( canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)) ); //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8); + real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp index 4ab827017a..7900f032c0 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp @@ -239,7 +239,7 @@ bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) { Vector poly = Variant(node->get_polygon()); //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8); + real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); switch(mode) { diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp index 0130ca41aa..a8fb5743b0 100644 --- a/tools/editor/plugins/sample_editor_plugin.cpp +++ b/tools/editor/plugins/sample_editor_plugin.cpp @@ -392,7 +392,7 @@ SampleEditor::SampleEditor() { add_child(stop); peakdisplay=Ref( memnew( ImageTexture) ); - peakdisplay->create( EDITOR_DEF("audio/sample_editor_preview_width",512),EDITOR_DEF("audio/sample_editor_preview_height",128),Image::FORMAT_RGB8); + peakdisplay->create( EDITOR_DEF("editors/sample_editor/preview_width",512),EDITOR_DEF("editors/sample_editor/preview_height",128),Image::FORMAT_RGB8); sample_texframe->set_expand(true); sample_texframe->set_texture(peakdisplay); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index d441fa7a11..b3d86817c7 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -672,7 +672,7 @@ bool ScriptEditor::_test_script_times_on_disk(Ref