summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/native_menu.cpp8
-rw-r--r--servers/native_menu.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/servers/native_menu.cpp b/servers/native_menu.cpp
index 4372c10707..d1894ba6c3 100644
--- a/servers/native_menu.cpp
+++ b/servers/native_menu.cpp
@@ -48,6 +48,7 @@ void NativeMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_size", "rid"), &NativeMenu::get_size);
ClassDB::bind_method(D_METHOD("popup", "rid", "position"), &NativeMenu::popup);
+ ClassDB::bind_method(D_METHOD("set_interface_direction", "rid", "is_rtl"), &NativeMenu::set_interface_direction);
ClassDB::bind_method(D_METHOD("set_popup_open_callback", "rid", "callback"), &NativeMenu::set_popup_open_callback);
ClassDB::bind_method(D_METHOD("get_popup_open_callback", "rid"), &NativeMenu::get_popup_open_callback);
ClassDB::bind_method(D_METHOD("set_popup_close_callback", "rid", "callback"), &NativeMenu::set_popup_close_callback);
@@ -111,6 +112,9 @@ void NativeMenu::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_GLOBAL_MENU);
BIND_ENUM_CONSTANT(FEATURE_POPUP_MENU);
+ BIND_ENUM_CONSTANT(FEATURE_OPEN_CLOSE_CALLBACK);
+ BIND_ENUM_CONSTANT(FEATURE_HOVER_CALLBACK);
+ BIND_ENUM_CONSTANT(FEATURE_KEY_CALLBACK);
BIND_ENUM_CONSTANT(INVALID_MENU_ID);
BIND_ENUM_CONSTANT(MAIN_MENU_ID);
@@ -173,6 +177,10 @@ void NativeMenu::popup(const RID &p_rid, const Vector2i &p_position) {
WARN_PRINT("Global menus are not supported on this platform.");
}
+void NativeMenu::set_interface_direction(const RID &p_rid, bool p_is_rtl) {
+ WARN_PRINT("Global menus are not supported on this platform.");
+}
+
void NativeMenu::set_popup_open_callback(const RID &p_rid, const Callable &p_callback) {
WARN_PRINT("Global menus are not supported on this platform.");
}
diff --git a/servers/native_menu.h b/servers/native_menu.h
index bb61caa633..f65e193972 100644
--- a/servers/native_menu.h
+++ b/servers/native_menu.h
@@ -54,6 +54,9 @@ public:
enum Feature {
FEATURE_GLOBAL_MENU,
FEATURE_POPUP_MENU,
+ FEATURE_OPEN_CLOSE_CALLBACK,
+ FEATURE_HOVER_CALLBACK,
+ FEATURE_KEY_CALLBACK,
};
enum SystemMenus {
@@ -78,6 +81,8 @@ public:
virtual Size2 get_size(const RID &p_rid) const;
virtual void popup(const RID &p_rid, const Vector2i &p_position);
+ virtual void set_interface_direction(const RID &p_rid, bool p_is_rtl);
+
virtual void set_popup_open_callback(const RID &p_rid, const Callable &p_callback);
virtual Callable get_popup_open_callback(const RID &p_rid) const;
virtual void set_popup_close_callback(const RID &p_rid, const Callable &p_callback);