Merge pull request #49178 from YeldhamDev/remove_dim_option

This commit is contained in:
Rémi Verschelde 2021-05-31 12:27:01 +02:00 committed by GitHub
commit f0aa4e597a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 12 deletions

View file

@ -2893,7 +2893,7 @@ void EditorNode::_exit_editor() {
_save_docks();
// Dim the editor window while it's quitting to make it clearer that it's busy
dim_editor(true, true);
dim_editor(true);
get_tree()->quit();
}
@ -5405,15 +5405,9 @@ void EditorNode::_open_imported() {
load_scene(open_import_request, true, false, true, true);
}
void EditorNode::dim_editor(bool p_dimming, bool p_force_dim) {
// Dimming can be forced regardless of the editor setting, which is useful when quitting the editor.
if ((p_force_dim || EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup")) && p_dimming) {
dimmed = true;
gui_base->set_modulate(Color(0.5, 0.5, 0.5));
} else {
dimmed = false;
gui_base->set_modulate(Color(1, 1, 1));
}
void EditorNode::dim_editor(bool p_dimming) {
dimmed = p_dimming;
gui_base->set_modulate(p_dimming ? Color(0.5, 0.5, 0.5) : Color(1, 1, 1));
}
bool EditorNode::is_editor_dimmed() const {