mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
add an "Exit" option under the Menu menu from the main screen.
This commit is contained in:
@@ -113,6 +113,7 @@ NewGame/menu/cardSizes=Kartengr
|
|||||||
NewGame/menu/cardStack="Stack" gr<67><72>e einstellen
|
NewGame/menu/cardStack="Stack" gr<67><72>e einstellen
|
||||||
NewGame/menu/cardStackOffset="Stack Offset" einstellen
|
NewGame/menu/cardStackOffset="Stack Offset" einstellen
|
||||||
NewGame/menu/about=<EFBFBD>ber
|
NewGame/menu/about=<EFBFBD>ber
|
||||||
|
NewGame/menu/exit=Aufgang
|
||||||
NewGame/options/title=Optionen
|
NewGame/options/title=Optionen
|
||||||
NewGame/options/font=Benutze LAF Schriften
|
NewGame/options/font=Benutze LAF Schriften
|
||||||
NewGame/options/cardOverlay=Benutze Mana und Text
|
NewGame/options/cardOverlay=Benutze Mana und Text
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ NewGame/menu/cardSizes=Specify Max Card Size
|
|||||||
NewGame/menu/cardStack=Specify Max Stack Size
|
NewGame/menu/cardStack=Specify Max Stack Size
|
||||||
NewGame/menu/cardStackOffset=Specify Stack Offset
|
NewGame/menu/cardStackOffset=Specify Stack Offset
|
||||||
NewGame/menu/about=About
|
NewGame/menu/about=About
|
||||||
|
NewGame/menu/exit=Exit
|
||||||
NewGame/options/title=Options
|
NewGame/options/title=Options
|
||||||
NewGame/options/font=Use LAF Fonts
|
NewGame/options/font=Use LAF Fonts
|
||||||
NewGame/options/cardOverlay=Use mana and text card overlay
|
NewGame/options/cardOverlay=Use mana and text card overlay
|
||||||
|
|||||||
@@ -436,6 +436,7 @@ public interface NewConstants {
|
|||||||
String CARD_STACK = "%s/NewGame/menu/cardStack";
|
String CARD_STACK = "%s/NewGame/menu/cardStack";
|
||||||
String CARD_STACK_OFFSET = "%s/NewGame/menu/cardStackOffset";
|
String CARD_STACK_OFFSET = "%s/NewGame/menu/cardStackOffset";
|
||||||
String ABOUT = "%s/NewGame/menu/about";
|
String ABOUT = "%s/NewGame/menu/about";
|
||||||
|
String EXIT = "%s/NewGame/menu/exit";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static interface OPTIONS {
|
public static interface OPTIONS {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package forge.view.swing;
|
package forge.view.swing;
|
||||||
|
|
||||||
import arcane.ui.CardPanel;
|
|
||||||
|
|
||||||
import com.esotericsoftware.minlog.Log;
|
import com.esotericsoftware.minlog.Log;
|
||||||
import forge.*;
|
import forge.*;
|
||||||
import forge.deck.Deck;
|
import forge.deck.Deck;
|
||||||
@@ -125,6 +123,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
|||||||
private final Action HOW_TO_PLAY_ACTION = new HowToPlayAction();
|
private final Action HOW_TO_PLAY_ACTION = new HowToPlayAction();
|
||||||
private final Action DNLD_PRICES_ACTION = new DownloadPriceAction();
|
private final Action DNLD_PRICES_ACTION = new DownloadPriceAction();
|
||||||
private final Action BUGZ_REPORTER_ACTION = new BugzReporterAction();
|
private final Action BUGZ_REPORTER_ACTION = new BugzReporterAction();
|
||||||
|
private final Action EXIT_ACTION = new ExitAction();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -200,7 +199,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
|||||||
// CARD_SIZES_ACTION,
|
// CARD_SIZES_ACTION,
|
||||||
LOOK_AND_FEEL_ACTION, DNLD_PRICES_ACTION, DOWNLOAD_ACTION_LQ, DOWNLOAD_ACTION_SETLQ, IMPORT_PICTURE,
|
LOOK_AND_FEEL_ACTION, DNLD_PRICES_ACTION, DOWNLOAD_ACTION_LQ, DOWNLOAD_ACTION_SETLQ, IMPORT_PICTURE,
|
||||||
CARD_SIZES_ACTION, CARD_STACK_ACTION, CARD_STACK_OFFSET_ACTION, BUGZ_REPORTER_ACTION,
|
CARD_SIZES_ACTION, CARD_STACK_ACTION, CARD_STACK_OFFSET_ACTION, BUGZ_REPORTER_ACTION,
|
||||||
ErrorViewer.ALL_THREADS_ACTION, ABOUT_ACTION };
|
ErrorViewer.ALL_THREADS_ACTION, ABOUT_ACTION, EXIT_ACTION };
|
||||||
JMenu menu = new JMenu(ForgeProps.getLocalized(MENU.TITLE));
|
JMenu menu = new JMenu(ForgeProps.getLocalized(MENU.TITLE));
|
||||||
for (Action a : actions) {
|
for (Action a : actions) {
|
||||||
menu.add(a);
|
menu.add(a);
|
||||||
@@ -284,6 +283,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
|||||||
this.addWindowListener(new WindowAdapter() {
|
this.addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing(final WindowEvent ev) {
|
public void windowClosing(final WindowEvent ev) {
|
||||||
|
dispose();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1405,6 +1405,29 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
|||||||
JOptionPane.showMessageDialog(null, area, "About", JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.showMessageDialog(null, area, "About", JOptionPane.INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author slapshot5
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static class ExitAction extends AbstractAction {
|
||||||
|
private static final long serialVersionUID = -319036939657136034L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ExitAction() {
|
||||||
|
super(ForgeProps.getLocalized(MENU_BAR.MENU.EXIT));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public final void actionPerformed(final ActionEvent e) {
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
Reference in New Issue
Block a user