summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp3
-rw-r--r--scene/main/viewport.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index f09fac6c71..ff8f0d05f1 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2502,6 +2502,9 @@ Variant Viewport::gui_get_drag_data() const {
return gui.drag_data;
}
+Control *Viewport::get_modal_stack_top() const {
+ return gui.modal_stack.size()?gui.modal_stack.back()->get():NULL;
+}
String Viewport::get_configuration_warning() const {
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 545020dfc7..aaa640e0e6 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -374,6 +374,7 @@ public:
bool gui_has_modal_stack() const;
Variant gui_get_drag_data() const;
+ Control *get_modal_stack_top() const;
virtual String get_configuration_warning() const;