- Added "How to Play" option to Help menu which links to the cunningly hidden "res\howto.txt".

This commit is contained in:
spr
2013-08-30 04:36:40 +00:00
parent 9a0b240e73
commit e21aac63f4

View File

@@ -45,11 +45,19 @@ public final class HelpMenu {
private static JMenu getMenu_GettingStarted() {
JMenu mnu = new JMenu("Getting Started");
mnu.add(getMenuItem_HowToPlayFile());
mnu.addSeparator();
mnu.add(getMenuItem_UrlLink("Forge Wiki", "http://www.slightlymagic.net/wiki/Forge"));
mnu.add(getMenuItem_UrlLink("What is Forge?", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=468"));
return mnu;
}
private static JMenuItem getMenuItem_HowToPlayFile() {
JMenuItem menuItem = new JMenuItem("How to Play");
menuItem.addActionListener(getOpenFileAction(getFile("res\\howto.txt")));
return menuItem;
}
private static JMenuItem getMenuItem_ReadMeFile() {
JMenuItem menuItem = new JMenuItem("README.txt");
menuItem.addActionListener(getOpenFileAction(getFile("README.txt")));
@@ -99,10 +107,10 @@ public final class HelpMenu {
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
String cmd = "rundll32 url.dll,FileProtocolHandler " + file.getCanonicalPath();
Runtime.getRuntime().exec(cmd);
}
else {
}
else {
Desktop.getDesktop().open(file);
}
}
}