1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Make the editor dimming smarter

This commit is contained in:
Michael Alexsander
2019-10-31 16:58:53 -03:00
parent 23a381d882
commit 36c4fd8935
4 changed files with 23 additions and 5 deletions

View File

@@ -5171,14 +5171,20 @@ void EditorNode::_open_imported() {
}
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
// 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));
}
}
bool EditorNode::is_editor_dimmed() const {
return dimmed;
}
void EditorNode::open_export_template_manager() {
export_template_manager->popup_manager();
@@ -5487,6 +5493,7 @@ EditorNode::EditorNode() {
singleton = this;
exiting = false;
dimmed = false;
last_checked_version = 0;
changing_scene = false;
_initializing_addons = false;