mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
"How To Play" is now part of the "Help" menu item. Fixes an issue on OSX
This commit is contained in:
@@ -119,6 +119,7 @@ NewGame/options/cardScale=Karten vergr
|
||||
NewGame/options/generate/title=Deckgenerator
|
||||
NewGame/options/generate/removeSmall=1/1 und 0/X Kreaturen entfernen
|
||||
NewGame/options/generate/removeArtifacts=Artefakte entfernen
|
||||
NewGame/help/title=Help
|
||||
|
||||
NewGame/gametype=Spieltyp
|
||||
NewGame/library=Bibliothek
|
||||
|
||||
@@ -127,7 +127,8 @@ NewGame/options/cardOverlay=Use mana and text card overlay
|
||||
NewGame/options/cardScale=Scale card images larger than original
|
||||
NewGame/options/generate/title=Generate Deck
|
||||
NewGame/options/generate/removeSmall=Remove 1/1 and 0/X Creatures
|
||||
NewGame/options/generate/removeArtifacts=Remove Artifacts"
|
||||
NewGame/options/generate/removeArtifacts=Remove Artifacts
|
||||
NewGame/help/title=Help
|
||||
|
||||
NewGame/gametype=Game Type
|
||||
NewGame/library=Library
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title=(How to Play)
|
||||
title=How to Play
|
||||
message=How to Play - (Revised: September 2009.)\n\n\n\
|
||||
Introduction\n\n\
|
||||
1. This game is similar to many other trading card games. You start out with 20 life and your goal is to reduce your opponents life to zero by attacking with your creatures. The game will end when your life or the computer's life is reduced to zero. You play \"matches\" against the computer as a set of \"best two out of three\" games."\n\n\
|
||||
|
||||
@@ -23,15 +23,14 @@ import javax.swing.*;
|
||||
import javax.swing.UIManager.LookAndFeelInfo;
|
||||
import javax.swing.border.TitledBorder;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/*CHOPPIC*/
|
||||
@@ -92,6 +91,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
|
||||
private Action CARD_STACK_ACTION = new CardStackAction();
|
||||
private Action CARD_STACK_OFFSET_ACTION = new CardStackOffsetAction();
|
||||
private Action ABOUT_ACTION = new AboutAction();
|
||||
private Action HOW_TO_PLAY_ACTION = new HowToPlayAction();
|
||||
private Action DNLD_PRICES_ACTION = new DownloadPriceAction();
|
||||
|
||||
static public ForgePreferences preferences;
|
||||
@@ -233,11 +233,19 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
|
||||
ImageCache.scaleLargerThanOriginal = cardScale.isSelected();
|
||||
}
|
||||
});
|
||||
|
||||
JMenu helpMenu = new JMenu(ForgeProps.getLocalized(MENU_BAR.HELP.TITLE)) ;
|
||||
|
||||
Action[] helpActions = {HOW_TO_PLAY_ACTION};
|
||||
for (Action a:helpActions) {
|
||||
helpMenu.add(a);
|
||||
}
|
||||
|
||||
JMenuBar bar = new JMenuBar();
|
||||
bar.add(menu);
|
||||
bar.add(optionsMenu);
|
||||
bar.add(new MenuItem_HowToPlay());
|
||||
bar.add(helpMenu);
|
||||
//bar.add(new MenuItem_HowToPlay());
|
||||
|
||||
setJMenuBar(bar);
|
||||
}
|
||||
@@ -1165,7 +1173,30 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
|
||||
Constant.Runtime.stackOffset[0] = offsets[index];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class HowToPlayAction extends AbstractAction {
|
||||
|
||||
private static final long serialVersionUID = 5552000208438248428L;
|
||||
|
||||
public HowToPlayAction() {
|
||||
super(ForgeProps.getLocalized(LANG.HowTo.TITLE));
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
String text = ForgeProps.getLocalized(LANG.HowTo.MESSAGE);
|
||||
|
||||
JTextArea area = new JTextArea(text, 25, 40);
|
||||
area.setWrapStyleWord(true);
|
||||
area.setLineWrap(true);
|
||||
area.setEditable(false);
|
||||
area.setOpaque(false);
|
||||
|
||||
|
||||
JOptionPane.showMessageDialog(null, new JScrollPane(area), ForgeProps.getLocalized(LANG.HowTo.TITLE),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AboutAction extends AbstractAction {
|
||||
|
||||
private static final long serialVersionUID = 5492173304463396871L;
|
||||
|
||||
@@ -347,6 +347,16 @@ public interface NewConstants {
|
||||
public static final String REMOVE_ARTIFACTS = "%s/NewGame/options/generate/removeArtifacts";
|
||||
}
|
||||
}
|
||||
|
||||
public static interface HELP {
|
||||
public static final String TITLE = "%s/NewGame/help/title";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static interface ERRORS {}
|
||||
|
||||
Reference in New Issue
Block a user