diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_settings.cpp | 8 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 9 | ||||
-rw-r--r-- | editor/project_manager.cpp | 8 |
3 files changed, 22 insertions, 3 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index c4e6d18163..b741c432ce 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -596,6 +596,10 @@ void EditorSettings::_load_default_text_editor_theme() { _initial_set("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15)); _initial_set("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1)); _initial_set("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1)); + + // GDScript highlighter + _initial_set("text_editor/highlighting/gdscript/function_definition_color", Color::html("#01e1ff")); + _initial_set("text_editor/highlighting/gdscript/node_path_color", Color::html("#64c15a")); } bool EditorSettings::_save_text_editor_theme(String p_file) { @@ -632,6 +636,10 @@ bool EditorSettings::_save_text_editor_theme(String p_file) { cf->set_value(theme_section, "search_result_color", ((Color)get("text_editor/highlighting/search_result_color")).to_html()); cf->set_value(theme_section, "search_result_border_color", ((Color)get("text_editor/highlighting/search_result_border_color")).to_html()); + //GDScript highlighter + cf->set_value(theme_section, "gdscript/function_definition_color", ((Color)get("text_editor/highlighting/gdscript/function_definition_color")).to_html()); + cf->set_value(theme_section, "gdscript/node_path_color", ((Color)get("text_editor/highlighting/gdscript/node_path_color")).to_html()); + Error err = cf->save(p_file); if (err == OK) { diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index bf7236cc2b..d0b842f231 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1047,6 +1047,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const Color comment_color = dim_color; const Color string_color = Color::html(dark_theme ? "#ffd942" : "#ffd118").linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3); + const Color function_definition_color = Color::html(dark_theme ? "#01e1ff" : "#00a5ba"); + const Color node_path_color = Color::html(dark_theme ? "64c15a" : "#518b4b"); + const Color te_background_color = Color(0, 0, 0, 0); const Color completion_background_color = base_color; const Color completion_selected_color = alpha1; @@ -1105,6 +1108,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { setting->set_initial_value("text_editor/highlighting/code_folding_color", code_folding_color, true); setting->set_initial_value("text_editor/highlighting/search_result_color", search_result_color, true); setting->set_initial_value("text_editor/highlighting/search_result_border_color", search_result_border_color, true); + + setting->set_initial_value("text_editor/highlighting/gdscript/function_definition_color", function_definition_color, true); + setting->set_initial_value("text_editor/highlighting/gdscript/node_path_color", node_path_color, true); } else if (text_editor_color_theme == "Default") { setting->set_initial_value("text_editor/highlighting/symbol_color", Color::html("badfff"), true); setting->set_initial_value("text_editor/highlighting/keyword_color", Color::html("ffffb3"), true); @@ -1136,6 +1142,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { setting->set_initial_value("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8), true); setting->set_initial_value("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1), true); setting->set_initial_value("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1), true); + + setting->set_initial_value("text_editor/highlighting/gdscript/function_definition_color", Color::html("#01e1ff"), true); + setting->set_initial_value("text_editor/highlighting/gdscript/node_path_color", Color::html("#64c15a"), true); } return theme; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 666f08cb2d..97d3a070ab 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -725,9 +725,11 @@ void ProjectManager::_update_project_buttons() { } } - erase_btn->set_disabled(selected_list.size() < 1); - open_btn->set_disabled(selected_list.size() < 1); - rename_btn->set_disabled(selected_list.size() < 1); + bool empty_selection = selected_list.empty(); + erase_btn->set_disabled(empty_selection); + open_btn->set_disabled(empty_selection); + rename_btn->set_disabled(empty_selection); + run_btn->set_disabled(empty_selection); } void ProjectManager::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) { |