Przeglądaj źródła

Using command + comma on macOS as default shortcut for editor settings

Eduardo Nunes Pereira 5 lat temu
rodzic
commit
75f77f751e
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      editor/editor_node.cpp

+ 4 - 1
editor/editor_node.cpp

@@ -6236,8 +6236,11 @@ EditorNode::EditorNode() {
 	left_menu_hb->add_child(settings_menu);
 	left_menu_hb->add_child(settings_menu);
 
 
 	p = settings_menu->get_popup();
 	p = settings_menu->get_popup();
-
+#ifdef OSX_ENABLED
+	p->add_shortcut(ED_SHORTCUT("editor/editor_settings", TTR("Editor Settings..."), KEY_MASK_CMD + KEY_COMMA), SETTINGS_PREFERENCES);
+#else
 	p->add_shortcut(ED_SHORTCUT("editor/editor_settings", TTR("Editor Settings...")), SETTINGS_PREFERENCES);
 	p->add_shortcut(ED_SHORTCUT("editor/editor_settings", TTR("Editor Settings...")), SETTINGS_PREFERENCES);
+#endif
 	p->add_separator();
 	p->add_separator();
 
 
 	editor_layouts = memnew(PopupMenu);
 	editor_layouts = memnew(PopupMenu);