You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Move global_menu_* methods to a separate NativeMenu class.
This commit is contained in:
@@ -6584,7 +6584,7 @@ EditorNode::EditorNode() {
|
||||
main_screen_vbox->add_theme_constant_override("separation", 0);
|
||||
scene_root_parent->add_child(main_screen_vbox);
|
||||
|
||||
bool global_menu = !bool(EDITOR_GET("interface/editor/use_embedded_menu")) && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU);
|
||||
bool global_menu = !bool(EDITOR_GET("interface/editor/use_embedded_menu")) && NativeMenu::get_singleton()->has_feature(NativeMenu::FEATURE_GLOBAL_MENU);
|
||||
bool can_expand = bool(EDITOR_GET("interface/editor/expand_to_title")) && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_EXTEND_TO_TITLE);
|
||||
|
||||
if (can_expand) {
|
||||
@@ -6715,7 +6715,7 @@ EditorNode::EditorNode() {
|
||||
#ifdef MACOS_ENABLED
|
||||
if (global_menu) {
|
||||
apple_menu = memnew(PopupMenu);
|
||||
apple_menu->set_system_menu_root("_apple");
|
||||
apple_menu->set_system_menu(NativeMenu::APPLICATION_MENU_ID);
|
||||
main_menu->add_child(apple_menu);
|
||||
|
||||
apple_menu->add_shortcut(ED_GET_SHORTCUT("editor/editor_settings"), SETTINGS_PREFERENCES);
|
||||
@@ -6838,7 +6838,7 @@ EditorNode::EditorNode() {
|
||||
|
||||
help_menu = memnew(PopupMenu);
|
||||
help_menu->set_name(TTR("Help"));
|
||||
help_menu->set_system_menu_root("_help");
|
||||
help_menu->set_system_menu(NativeMenu::HELP_MENU_ID);
|
||||
main_menu->add_child(help_menu);
|
||||
|
||||
help_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
||||
|
||||
Reference in New Issue
Block a user