summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/connections_dialog.cpp35
-rw-r--r--editor/connections_dialog.h2
-rw-r--r--editor/editor_file_dialog.cpp56
-rw-r--r--editor/editor_file_dialog.h3
-rw-r--r--editor/editor_settings.cpp23
-rw-r--r--editor/editor_settings.h2
-rw-r--r--editor/plugins/script_editor_plugin.cpp24
-rw-r--r--editor/plugins/script_editor_plugin.h1
-rw-r--r--editor/project_manager.cpp19
-rw-r--r--editor/project_manager.h1
10 files changed, 99 insertions, 67 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 82fc8e5cfa..569ad0297e 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -126,7 +126,6 @@ void ConnectDialog::ok_pressed() {
}
}
emit_signal("connected");
- hide();
}
void ConnectDialog::_cancel_pressed() {
@@ -458,7 +457,7 @@ ConnectDialog::~ConnectDialog() {
memdelete(cdbinds);
}
-//ConnectionsDock ==========================
+//////////////////////////////////////////
struct _ConnectionsDockMethodInfoSort {
@@ -490,11 +489,11 @@ void ConnectionsDock::_make_or_edit_connection() {
bool oshot = connect_dialog->get_oneshot();
cToMake.flags = CONNECT_PERSIST | (defer ? CONNECT_DEFERRED : 0) | (oshot ? CONNECT_ONESHOT : 0);
- //conditions to add function, must have a script and must have a method
+ // Conditions to add function, must have a script and must have a method.
bool add_script_function = !target->get_script().is_null() && !ClassDB::has_method(target->get_class(), cToMake.method);
PoolStringArray script_function_args;
if (add_script_function) {
- // pick up args here before "it" is deleted by update_tree
+ // Pick up args here before "it" is deleted by update_tree.
script_function_args = it->get_metadata(0).operator Dictionary()["args"];
for (int i = 0; i < cToMake.binds.size(); i++) {
script_function_args.append("extra_arg_" + itos(i));
@@ -509,7 +508,7 @@ void ConnectionsDock::_make_or_edit_connection() {
}
// IMPORTANT NOTE: _disconnect and _connect cause an update_tree,
- // which will delete the object "it" is pointing to
+ // which will delete the object "it" is pointing to.
it = NULL;
if (add_script_function) {
@@ -549,7 +548,7 @@ Break single connection w/ undo-redo functionality.
void ConnectionsDock::_disconnect(TreeItem &item) {
Connection c = item.get_metadata(0);
- ERR_FAIL_COND(c.source != selectedNode); //shouldn't happen but...bugcheck
+ ERR_FAIL_COND(c.source != selectedNode); // Shouldn't happen but... Bugcheck.
undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), c.signal, c.method));
@@ -557,7 +556,7 @@ void ConnectionsDock::_disconnect(TreeItem &item) {
undo_redo->add_undo_method(selectedNode, "connect", c.signal, c.target, c.method, c.binds, c.flags);
undo_redo->add_do_method(this, "update_tree");
undo_redo->add_undo_method(this, "update_tree");
- undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); // To force redraw of scene tree.
undo_redo->add_undo_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree");
undo_redo->commit_action();
@@ -596,7 +595,7 @@ void ConnectionsDock::_disconnect_all() {
void ConnectionsDock::_tree_item_selected() {
TreeItem *item = tree->get_selected();
- if (!item) { //Unlikely. Disable button just in case.
+ if (!item) { // Unlikely. Disable button just in case.
connect_button->set_text(TTR("Connect..."));
connect_button->set_disabled(true);
} else if (_is_item_signal(*item)) {
@@ -608,7 +607,7 @@ void ConnectionsDock::_tree_item_selected() {
}
}
-void ConnectionsDock::_tree_item_activated() { //"Activation" on double-click.
+void ConnectionsDock::_tree_item_activated() { // "Activation" on double-click.
TreeItem *item = tree->get_selected();
@@ -630,7 +629,6 @@ bool ConnectionsDock::_is_item_signal(TreeItem &item) {
/*
Open connection dialog with TreeItem data to CREATE a brand-new connection.
*/
-
void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
String signal = item.get_metadata(0).operator Dictionary()["name"];
@@ -640,10 +638,10 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
CharType c = midname[i];
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_')) {
if (c == ' ') {
- //Replace spaces with underlines.
+ // Replace spaces with underlines.
c = '_';
} else {
- //Remove any other characters.
+ // Remove any other characters.
midname.remove(i);
i--;
continue;
@@ -828,7 +826,6 @@ void ConnectionsDock::update_tree() {
selectedNode->get_signal_list(&node_signals);
- //node_signals.sort_custom<_ConnectionsDockMethodInfoSort>();
bool did_script = false;
StringName base = selectedNode->get_class();
@@ -955,7 +952,7 @@ void ConnectionsDock::update_tree() {
}
}
- connect_button->set_text(TTR("Connect"));
+ connect_button->set_text(TTR("Connect..."));
connect_button->set_disabled(true);
}
@@ -975,7 +972,6 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
tree->set_allow_rmb_select(true);
connect_button = memnew(Button);
- connect_button->set_text(TTR("Connect"));
HBoxContainer *hb = memnew(HBoxContainer);
vbc->add_child(hb);
hb->add_spacer();
@@ -1005,15 +1001,6 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
slot_menu->add_item(TTR("Go To Method"), GO_TO_SCRIPT);
slot_menu->add_item(TTR("Disconnect"), DISCONNECT);
- /*
- node_only->set_anchor( MARGIN_TOP, ANCHOR_END );
- node_only->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- node_only->set_anchor( MARGIN_RIGHT, ANCHOR_END );
-
- node_only->set_begin( Point2( 20,51) );
- node_only->set_end( Point2( 10,44) );
- */
-
connect_dialog->connect("connected", this, "_make_or_edit_connection");
tree->connect("item_selected", this, "_tree_item_selected");
tree->connect("item_activated", this, "_tree_item_activated");
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 94f1510810..195c9e1e7d 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -104,7 +104,7 @@ public:
~ConnectDialog();
};
-//========================================
+//////////////////////////////////////////
class ConnectionsDock : public VBoxContainer {
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 1a293adb4b..8025fc9795 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -63,6 +63,7 @@ void EditorFileDialog::_notification(int p_what) {
dir_up->set_icon(get_icon("ArrowUp", "EditorIcons"));
refresh->set_icon(get_icon("Reload", "EditorIcons"));
favorite->set_icon(get_icon("Favorites", "EditorIcons"));
+ show_hidden->set_icon(get_icon("GuiVisibilityVisible", "EditorIcons"));
fav_up->set_icon(get_icon("MoveUp", "EditorIcons"));
fav_down->set_icon(get_icon("MoveDown", "EditorIcons"));
@@ -86,9 +87,9 @@ void EditorFileDialog::_notification(int p_what) {
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- 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);
+ bool is_showing_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
+ if (show_hidden_files != is_showing_hidden)
+ set_show_hidden_files(is_showing_hidden);
set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
// update icons
@@ -140,7 +141,7 @@ void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
handled = true;
}
if (ED_IS_SHORTCUT("file_dialog/toggle_favorite", p_event)) {
- _favorite_toggled(favorite->is_pressed());
+ _favorite_pressed();
handled = true;
}
if (ED_IS_SHORTCUT("file_dialog/toggle_mode", p_event)) {
@@ -231,6 +232,7 @@ void EditorFileDialog::_file_entered(const String &p_file) {
}
void EditorFileDialog::_save_confirm_pressed() {
+
String f = dir_access->get_current_dir().plus_file(file->get_text());
_save_to_recent();
hide();
@@ -717,20 +719,19 @@ void EditorFileDialog::update_file_list() {
List<String> files;
List<String> dirs;
- bool isdir;
- bool ishidden;
- bool show_hidden = show_hidden_files;
+ bool is_dir;
+ bool is_hidden;
String item;
- while ((item = dir_access->get_next(&isdir)) != "") {
+ while ((item = dir_access->get_next(&is_dir)) != "") {
if (item == "." || item == "..")
continue;
- ishidden = dir_access->current_is_hidden();
+ is_hidden = dir_access->current_is_hidden();
- if (show_hidden || !ishidden) {
- if (!isdir)
+ if (show_hidden_files || !is_hidden) {
+ if (!is_dir)
files.push_back(item);
else
dirs.push_back(item);
@@ -1130,6 +1131,7 @@ void EditorFileDialog::_update_drives() {
}
void EditorFileDialog::_favorite_selected(int p_idx) {
+
dir_access->change_dir(favorites->get_item_metadata(p_idx));
file->set_text("");
update_dir();
@@ -1210,7 +1212,7 @@ void EditorFileDialog::_update_favorites() {
favorites->add_item(name, folder_icon);
} else {
- continue; // We don't handle favorite files here
+ continue; // We don't handle favorite files here.
}
favorites->set_item_metadata(favorites->get_item_count() - 1, favorited[i]);
@@ -1218,11 +1220,12 @@ void EditorFileDialog::_update_favorites() {
if (setthis) {
favorite->set_pressed(true);
favorites->set_current(favorites->get_item_count() - 1);
+ recent->unselect_all();
}
}
}
-void EditorFileDialog::_favorite_toggled(bool p_toggle) {
+void EditorFileDialog::_favorite_pressed() {
bool res = access == ACCESS_RESOURCES;
String cd = get_current_dir();
@@ -1253,12 +1256,6 @@ void EditorFileDialog::_favorite_toggled(bool p_toggle) {
_update_favorites();
}
-void EditorFileDialog::_favorite_pressed() {
-
- favorite->set_pressed(!favorite->is_pressed());
- _favorite_toggled(favorite->is_pressed());
-}
-
void EditorFileDialog::_recent_selected(int p_idx) {
Vector<String> recentd = EditorSettings::get_singleton()->get_recent_dirs();
@@ -1381,7 +1378,6 @@ void EditorFileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_go_forward"), &EditorFileDialog::_go_forward);
ClassDB::bind_method(D_METHOD("_go_up"), &EditorFileDialog::_go_up);
- ClassDB::bind_method(D_METHOD("_favorite_toggled"), &EditorFileDialog::_favorite_toggled);
ClassDB::bind_method(D_METHOD("_favorite_pressed"), &EditorFileDialog::_favorite_pressed);
ClassDB::bind_method(D_METHOD("_favorite_selected"), &EditorFileDialog::_favorite_selected);
ClassDB::bind_method(D_METHOD("_favorite_move_up"), &EditorFileDialog::_favorite_move_up);
@@ -1418,6 +1414,7 @@ void EditorFileDialog::_bind_methods() {
void EditorFileDialog::set_show_hidden_files(bool p_show) {
show_hidden_files = p_show;
+ show_hidden->set_pressed(p_show);
invalidate();
}
@@ -1523,17 +1520,23 @@ EditorFileDialog::EditorFileDialog() {
pathhb->add_child(refresh);
favorite = memnew(ToolButton);
- favorite->set_flat(true);
favorite->set_toggle_mode(true);
favorite->set_tooltip(TTR("(Un)favorite current folder."));
favorite->connect("pressed", this, "_favorite_pressed");
pathhb->add_child(favorite);
- Ref<ButtonGroup> view_mode_group;
- view_mode_group.instance();
+ show_hidden = memnew(ToolButton);
+ show_hidden->set_toggle_mode(true);
+ show_hidden->set_pressed(is_showing_hidden_files());
+ show_hidden->set_tooltip(TTR("Toggle visibility of hidden files."));
+ show_hidden->connect("toggled", this, "set_show_hidden_files");
+ pathhb->add_child(show_hidden);
pathhb->add_child(memnew(VSeparator));
+ Ref<ButtonGroup> view_mode_group;
+ view_mode_group.instance();
+
mode_thumbnails = memnew(ToolButton);
mode_thumbnails->connect("pressed", this, "set_display_mode", varray(DISPLAY_THUMBNAILS));
mode_thumbnails->set_toggle_mode(true);
@@ -1593,6 +1596,7 @@ EditorFileDialog::EditorFileDialog() {
rec_vb->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
rec_vb->set_v_size_flags(SIZE_EXPAND_FILL);
recent = memnew(ItemList);
+ recent->set_allow_reselect(true);
rec_vb->add_margin_child(TTR("Recent:"), recent, true);
recent->connect("item_selected", this, "_recent_selected");
@@ -1609,7 +1613,7 @@ EditorFileDialog::EditorFileDialog() {
list_vb->add_child(memnew(Label(TTR("Directories & Files:"))));
preview_hb->add_child(list_vb);
- // Item (files and folders) list with context menu
+ // Item (files and folders) list with context menu.
item_list = memnew(ItemList);
item_list->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1622,7 +1626,7 @@ EditorFileDialog::EditorFileDialog() {
item_menu->connect("id_pressed", this, "_item_menu_id_pressed");
add_child(item_menu);
- // Other stuff
+ // Other stuff.
preview_vb = memnew(VBoxContainer);
preview_hb->add_child(preview_vb);
@@ -1641,7 +1645,7 @@ EditorFileDialog::EditorFileDialog() {
filter = memnew(OptionButton);
filter->set_stretch_ratio(3);
filter->set_h_size_flags(SIZE_EXPAND_FILL);
- filter->set_clip_text(true); // too many extensions overflow it
+ filter->set_clip_text(true); // Too many extensions overflow it.
filename_hbc->add_child(filter);
filename_hbc->set_h_size_flags(SIZE_EXPAND_FILL);
item_vb->add_child(filename_hbc);
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index 529aaa71de..6578be8563 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -116,11 +116,13 @@ private:
DirAccess *dir_access;
ConfirmationDialog *confirm_save;
DependencyRemoveDialog *remove_dialog;
+
ToolButton *mode_thumbnails;
ToolButton *mode_list;
ToolButton *refresh;
ToolButton *favorite;
+ ToolButton *show_hidden;
ToolButton *fav_up;
ToolButton *fav_down;
@@ -150,7 +152,6 @@ private:
void update_filters();
void _update_favorites();
- void _favorite_toggled(bool p_toggle);
void _favorite_pressed();
void _favorite_selected(int p_idx);
void _favorite_move_up();
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index c7fac07ba2..a6746c6d25 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -699,6 +699,10 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
return false;
}
+bool EditorSettings::_is_default_text_editor_theme(String p_theme_name) {
+ return p_theme_name == "default" || p_theme_name == "adaptive" || p_theme_name == "custom";
+}
+
static Dictionary _get_builtin_script_templates() {
Dictionary templates;
@@ -1291,7 +1295,7 @@ void EditorSettings::list_text_editor_themes() {
d->list_dir_begin();
String file = d->get_next();
while (file != String()) {
- if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default" && file.get_basename().to_lower() != "adaptive" && file.get_basename().to_lower() != "custom") {
+ if (file.get_extension() == "tet" && !_is_default_text_editor_theme(file.get_basename().to_lower())) {
custom_themes.push_back(file.get_basename());
}
file = d->get_next();
@@ -1308,14 +1312,16 @@ void EditorSettings::list_text_editor_themes() {
}
void EditorSettings::load_text_editor_theme() {
- if (get("text_editor/theme/color_theme") == "Default" || get("text_editor/theme/color_theme") == "Adaptive" || get("text_editor/theme/color_theme") == "Custom") {
- if (get("text_editor/theme/color_theme") == "Default") {
+ String p_file = get("text_editor/theme/color_theme");
+
+ if (_is_default_text_editor_theme(p_file.get_file().to_lower())) {
+ if (p_file == "Default") {
_load_default_text_editor_theme();
}
return; // sorry for "Settings changed" console spam
}
- String theme_path = get_text_editor_themes_dir().plus_file((String)get("text_editor/theme/color_theme") + ".tet");
+ String theme_path = get_text_editor_themes_dir().plus_file(p_file + ".tet");
Ref<ConfigFile> cf = memnew(ConfigFile);
Error err = cf->load(theme_path);
@@ -1367,7 +1373,7 @@ bool EditorSettings::save_text_editor_theme() {
String p_file = get("text_editor/theme/color_theme");
- if (p_file.get_file().to_lower() == "default" || p_file.get_file().to_lower() == "adaptive" || p_file.get_file().to_lower() == "custom") {
+ if (_is_default_text_editor_theme(p_file.get_file().to_lower())) {
return false;
}
String theme_path = get_text_editor_themes_dir().plus_file(p_file + ".tet");
@@ -1379,7 +1385,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
p_file += ".tet";
}
- if (p_file.get_file().to_lower() == "default.tet" || p_file.get_file().to_lower() == "adaptive.tet" || p_file.get_file().to_lower() == "custom.tet") {
+ if (_is_default_text_editor_theme(p_file.get_file().to_lower().trim_suffix(".tet"))) {
return false;
}
if (_save_text_editor_theme(p_file)) {
@@ -1397,6 +1403,11 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
return false;
}
+bool EditorSettings::is_default_text_editor_theme() {
+ String p_file = get("text_editor/theme/color_theme");
+ return _is_default_text_editor_theme(p_file.get_file().to_lower());
+}
+
Vector<String> EditorSettings::get_script_templates(const String &p_extension) {
Vector<String> templates;
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 43a8cbf739..2ee8dd805b 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -123,6 +123,7 @@ private:
void _load_defaults(Ref<ConfigFile> p_extra_config = NULL);
void _load_default_text_editor_theme();
bool _save_text_editor_theme(String p_file);
+ bool _is_default_text_editor_theme(String p_file);
protected:
static void _bind_methods();
@@ -187,6 +188,7 @@ public:
bool import_text_editor_theme(String p_file);
bool save_text_editor_theme();
bool save_text_editor_theme_as(String p_file);
+ bool is_default_text_editor_theme();
Vector<String> get_script_templates(const String &p_extension);
String get_editor_layouts_config() const;
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 6bf916cdfc..7456c5d016 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1311,23 +1311,29 @@ void ScriptEditor::_theme_option(int p_option) {
EditorSettings::get_singleton()->load_text_editor_theme();
} break;
case THEME_SAVE: {
- if (!EditorSettings::get_singleton()->save_text_editor_theme()) {
+ if (EditorSettings::get_singleton()->is_default_text_editor_theme()) {
+ ScriptEditor::_show_save_theme_as_dialog();
+ } else if (!EditorSettings::get_singleton()->save_text_editor_theme()) {
editor->show_warning(TTR("Error while saving theme"), TTR("Error saving"));
}
} break;
case THEME_SAVE_AS: {
- file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
- file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- file_dialog_option = THEME_SAVE_AS;
- file_dialog->clear_filters();
- file_dialog->add_filter("*.tet");
- file_dialog->set_current_path(EditorSettings::get_singleton()->get_text_editor_themes_dir().plus_file(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
- file_dialog->popup_centered_ratio();
- file_dialog->set_title(TTR("Save Theme As..."));
+ ScriptEditor::_show_save_theme_as_dialog();
} break;
}
}
+void ScriptEditor::_show_save_theme_as_dialog() {
+ file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
+ file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
+ file_dialog_option = THEME_SAVE_AS;
+ file_dialog->clear_filters();
+ file_dialog->add_filter("*.tet");
+ file_dialog->set_current_path(EditorSettings::get_singleton()->get_text_editor_themes_dir().plus_file(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
+ file_dialog->popup_centered_ratio();
+ file_dialog->set_title(TTR("Save Theme As..."));
+}
+
void ScriptEditor::_tab_changed(int p_which) {
ensure_select_current();
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index fae98d6ec8..7cd347e2d0 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -264,6 +264,7 @@ class ScriptEditor : public PanelContainer {
void _tab_changed(int p_which);
void _menu_option(int p_option);
void _theme_option(int p_option);
+ void _show_save_theme_as_dialog();
Tree *disk_changed_list;
ConfirmationDialog *disk_changed;
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 7b521aba13..3fd497ed7b 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -961,9 +961,25 @@ void ProjectManager::_notification(int p_what) {
set_process_unhandled_input(is_visible_in_tree());
} break;
+ case NOTIFICATION_WM_QUIT_REQUEST: {
+
+ _dim_window();
+ } break;
}
}
+void ProjectManager::_dim_window() {
+
+ // This method must be called before calling `get_tree()->quit()`.
+ // Otherwise, its effect won't be visible
+
+ // Dim the project manager window while it's quitting to make it clearer that it's busy.
+ // No transition is applied, as the effect needs to be visible immediately
+ float c = 1.0f - float(EDITOR_GET("interface/editor/dim_amount"));
+ Color dim_color = Color(c, c, c);
+ gui_base->set_modulate(dim_color);
+}
+
void ProjectManager::_panel_draw(Node *p_hb) {
HBoxContainer *hb = Object::cast_to<HBoxContainer>(p_hb);
@@ -1514,6 +1530,7 @@ void ProjectManager::_open_selected_projects() {
ERR_FAIL_COND(err);
}
+ _dim_window();
get_tree()->quit();
}
@@ -1780,11 +1797,13 @@ void ProjectManager::_restart_confirm() {
Error err = OS::get_singleton()->execute(exec, args, false, &pid);
ERR_FAIL_COND(err);
+ _dim_window();
get_tree()->quit();
}
void ProjectManager::_exit_dialog() {
+ _dim_window();
get_tree()->quit();
}
diff --git a/editor/project_manager.h b/editor/project_manager.h
index fa878e75a6..a7cc6549f5 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -110,6 +110,7 @@ class ProjectManager : public Control {
void _install_project(const String &p_zip_path, const String &p_title);
+ void _dim_window();
void _panel_draw(Node *p_hb);
void _panel_input(const Ref<InputEvent> &p_ev, Node *p_hb);
void _unhandled_input(const Ref<InputEvent> &p_ev);