aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/dialogs.cpp
diff options
context:
space:
mode:
authorAndreas Haas2017-03-06 20:11:56 +0100
committerAndreas Haas2017-03-06 20:14:41 +0100
commit9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0 (patch)
tree6cdd766bd1f70283b95c5bbcf9e0d291c14854b3 /scene/gui/dialogs.cpp
parent15c4d5006ee6982223777ababfbc2c040f3e344f (diff)
downloadgodot-9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0.tar.gz
godot-9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0.tar.zst
godot-9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0.zip
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r--scene/gui/dialogs.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index d081eda86..89008b56b 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
}
}