summaryrefslogtreecommitdiffstats
path: root/servers/native_menu.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-03-14 22:34:42 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-03-14 22:34:42 +0100
commit4ca6cd054f303cfec4da21d51fc25e13a43f3e98 (patch)
tree5f5badc43cdb29fc9599dd675e8b6165dee697f4 /servers/native_menu.cpp
parent453485aede521b3c6d2d960bad94acc2eb90f177 (diff)
parentac7583e4498598281e4372d69d7aab10d90aeacb (diff)
downloadredot-engine-4ca6cd054f303cfec4da21d51fc25e13a43f3e98.tar.gz
Merge pull request #89273 from bruvzg/win_native_menu
[NativeMenu] Implement native popup menu support on Windows.
Diffstat (limited to 'servers/native_menu.cpp')
-rw-r--r--servers/native_menu.cpp8
1 files changed, 8 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.");
}