diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 9fa33044e1..d42345d9a2 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -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; |