feat: adds PCUAE wiki to help menu
This commit is contained in:
parent
8c8d424a92
commit
d678b93449
|
@ -119,6 +119,7 @@ public class MenuManager
|
||||||
private JMenuItem installViceModeItem;
|
private JMenuItem installViceModeItem;
|
||||||
|
|
||||||
private JMenuItem helpItem;
|
private JMenuItem helpItem;
|
||||||
|
private JMenuItem pcuaeWikiItem;
|
||||||
private JMenuItem aboutItem;
|
private JMenuItem aboutItem;
|
||||||
private JMenuItem newVersionItem;
|
private JMenuItem newVersionItem;
|
||||||
|
|
||||||
|
@ -237,6 +238,7 @@ public class MenuManager
|
||||||
helpMenu = new JMenu("Help");
|
helpMenu = new JMenu("Help");
|
||||||
helpMenu.setMnemonic('H');
|
helpMenu.setMnemonic('H');
|
||||||
helpMenu.add(getHelpItem());
|
helpMenu.add(getHelpItem());
|
||||||
|
helpMenu.add(getPcuaeWikiItem());
|
||||||
helpMenu.add(getCheckVersionItem());
|
helpMenu.add(getCheckVersionItem());
|
||||||
helpMenu.add(getAboutItem());
|
helpMenu.add(getAboutItem());
|
||||||
}
|
}
|
||||||
|
@ -806,6 +808,28 @@ public class MenuManager
|
||||||
return helpItem;
|
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()
|
private JMenuItem getAboutItem()
|
||||||
{
|
{
|
||||||
aboutItem = new JMenuItem("About...");
|
aboutItem = new JMenuItem("About...");
|
||||||
|
|
Loading…
Reference in New Issue