Merge pull request #30327 from Calinou/editor-dim-window-quitting
Dim the editor window while it's quitting
This commit is contained in:
commit
133a07ed2d
1 changed files with 7 additions and 0 deletions
|
@ -2622,6 +2622,13 @@ void EditorNode::_exit_editor() {
|
||||||
exiting = true;
|
exiting = true;
|
||||||
resource_preview->stop(); //stop early to avoid crashes
|
resource_preview->stop(); //stop early to avoid crashes
|
||||||
_save_docks();
|
_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();
|
get_tree()->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue