feat: adds PCUAE wiki to help menu

This commit is contained in:
lantzelot-swe 2021-12-29 22:59:30 +01:00
parent 8c8d424a92
commit d678b93449
1 changed files with 24 additions and 0 deletions
src/main/java/se/lantz/gui

View File

@ -119,6 +119,7 @@ public class MenuManager
private JMenuItem installViceModeItem;
private JMenuItem helpItem;
private JMenuItem pcuaeWikiItem;
private JMenuItem aboutItem;
private JMenuItem newVersionItem;
@ -237,6 +238,7 @@ public class MenuManager
helpMenu = new JMenu("Help");
helpMenu.setMnemonic('H');
helpMenu.add(getHelpItem());
helpMenu.add(getPcuaeWikiItem());
helpMenu.add(getCheckVersionItem());
helpMenu.add(getAboutItem());
}
@ -805,6 +807,28 @@ public class MenuManager
});
return helpItem;
}
private JMenuItem getPcuaeWikiItem()
{
pcuaeWikiItem = new JMenuItem("PCUAE wiki");
KeyStroke keyStrokeToImportGames = KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0);
pcuaeWikiItem.setAccelerator(keyStrokeToImportGames);
pcuaeWikiItem.setMnemonic('p');
pcuaeWikiItem.addActionListener(e -> {
try
{
Desktop.getDesktop().browse(new URI("https://projectcarouselusb.online/help-2"));
}
catch (IOException | URISyntaxException ex)
{
JOptionPane.showMessageDialog(MainWindow.getInstance(),
"Could not open PCUAE wiki",
"Help missing",
JOptionPane.ERROR_MESSAGE);
}
});
return pcuaeWikiItem;
}
private JMenuItem getAboutItem()
{