summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-05 09:44:43 +0200
committerGitHub <noreply@github.com>2019-07-05 09:44:43 +0200
commit133a07ed2dc148c7bde38884eea9f4d367510af8 (patch)
treeb44e355df868130ac924f008632521b57c6c5cef
parentc4016398200014e911759905991e333688ff0ffd (diff)
parent492c3196ae71218920c896f458d6501ad4cab54a (diff)
Merge pull request #30327 from Calinou/editor-dim-window-quitting
Dim the editor window while it's quitting
-rw-r--r--editor/editor_node.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 8d2d760e51..9d3be1ab9e 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2622,6 +2622,13 @@ void EditorNode::_exit_editor() {
exiting = true;
resource_preview->stop(); //stop early to avoid crashes
_save_docks();
+
+ // Dim the editor 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);
+
get_tree()->quit();
}