diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/dialogs.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index d081eda86d..89008b56bf 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -31,6 +31,10 @@ #include "print_string.h" #include "translation.h" +#ifdef TOOLS_ENABLED +#include "editor/editor_node.h" +#endif + void WindowDialog::_post_popup() { drag_type = DRAG_NONE; // just in case @@ -199,6 +203,16 @@ void WindowDialog::_notification(int p_what) { set_default_cursor_shape(CURSOR_ARROW); } } break; +#ifdef TOOLS_ENABLED + case NOTIFICATION_POST_POPUP: { + if (get_tree() && get_tree()->is_editor_hint()) + EditorNode::get_singleton()->dim_editor(true); + } break; + case NOTIFICATION_POPUP_HIDE: { + if (get_tree() && get_tree()->is_editor_hint()) + EditorNode::get_singleton()->dim_editor(false); + } break; +#endif } } |