summaryrefslogtreecommitdiffstats
path: root/servers/display/native_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/display/native_menu.cpp')
-rw-r--r--servers/display/native_menu.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/servers/display/native_menu.cpp b/servers/display/native_menu.cpp
index ca46560c7c..c7346637d8 100644
--- a/servers/display/native_menu.cpp
+++ b/servers/display/native_menu.cpp
@@ -56,6 +56,8 @@ void NativeMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_minimum_width", "rid", "width"), &NativeMenu::set_minimum_width);
ClassDB::bind_method(D_METHOD("get_minimum_width", "rid"), &NativeMenu::get_minimum_width);
+ ClassDB::bind_method(D_METHOD("is_opened", "rid"), &NativeMenu::is_opened);
+
ClassDB::bind_method(D_METHOD("add_submenu_item", "rid", "label", "submenu_rid", "tag", "index"), &NativeMenu::add_submenu_item, DEFVAL(Variant()), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("add_item", "rid", "label", "callback", "key_callback", "tag", "accelerator", "index"), &NativeMenu::add_item, DEFVAL(Callable()), DEFVAL(Callable()), DEFVAL(Variant()), DEFVAL(Key::NONE), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("add_check_item", "rid", "label", "callback", "key_callback", "tag", "accelerator", "index"), &NativeMenu::add_check_item, DEFVAL(Callable()), DEFVAL(Callable()), DEFVAL(Variant()), DEFVAL(Key::NONE), DEFVAL(-1));
@@ -200,6 +202,11 @@ Callable NativeMenu::get_popup_close_callback(const RID &p_rid) const {
return Callable();
}
+bool NativeMenu::is_opened(const RID &p_rid) const {
+ WARN_PRINT("Global menus are not supported on this platform.");
+ return false;
+}
+
void NativeMenu::set_minimum_width(const RID &p_rid, float p_width) {
WARN_PRINT("Global menus are not supported on this platform.");
}