mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Added "How to Play" option to Help menu which links to the cunningly hidden "res\howto.txt".
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user