diff options
| author | Michael Alexsander <michaelalexsander@protonmail.com> | 2019-10-31 16:58:53 -0300 |
|---|---|---|
| committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2019-10-31 16:58:53 -0300 |
| commit | 36c4fd8935596f0d67a3eaa7d8779e6891d58564 (patch) | |
| tree | 16c445e6a009b2405589a28d8729c187d7c1972e /editor/editor_node.cpp | |
| parent | 23a381d8827dbcb2d295fa393a5400f7a7e0a1c1 (diff) | |
| download | redot-engine-36c4fd8935596f0d67a3eaa7d8779e6891d58564.tar.gz | |
Make the editor dimming smarter
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; |
