diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-03-07 20:42:24 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-03-13 10:51:38 +0200 |
commit | ac7583e4498598281e4372d69d7aab10d90aeacb (patch) | |
tree | 3ca2b6ec91bce1f68db0d3e768dd4ed6ae5b9a88 /servers/native_menu.cpp | |
parent | 61282068f4d59cb48f35ad95391728c58d9008ab (diff) | |
download | redot-engine-ac7583e4498598281e4372d69d7aab10d90aeacb.tar.gz |
[NativeMenu] Implement native popup menu support on Windows.
Diffstat (limited to 'servers/native_menu.cpp')
-rw-r--r-- | servers/native_menu.cpp | 8 |
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."); } |