summaryrefslogtreecommitdiff
path: root/core/os/main_loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/main_loop.cpp')
-rw-r--r--core/os/main_loop.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 9946ced2f3..eca3b2a7f4 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -49,6 +49,8 @@ void MainLoop::_bind_methods() {
BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen")));
BIND_VMETHOD(MethodInfo("_finalize"));
+ BIND_VMETHOD(MethodInfo("_global_menu_action", PropertyInfo(Variant::NIL, "id"), PropertyInfo(Variant::NIL, "meta")));
+
BIND_CONSTANT(NOTIFICATION_WM_MOUSE_ENTER);
BIND_CONSTANT(NOTIFICATION_WM_MOUSE_EXIT);
BIND_CONSTANT(NOTIFICATION_WM_FOCUS_IN);
@@ -115,6 +117,12 @@ void MainLoop::drop_files(const Vector<String> &p_files, int p_from_screen) {
get_script_instance()->call("_drop_files", p_files, p_from_screen);
}
+void MainLoop::global_menu_action(const Variant &p_id, const Variant &p_meta) {
+
+ if (get_script_instance())
+ get_script_instance()->call("_global_menu_action", p_id, p_meta);
+}
+
void MainLoop::finish() {
if (get_script_instance()) {