Always prompt user before exiting or restarting Forge

This commit is contained in:
drdev
2013-10-09 04:45:44 +00:00
parent 0ba8b530fe
commit c05d299fe4

View File

@@ -136,11 +136,12 @@ public enum FControl implements KeyEventDispatcher {
} }
public boolean canExitForge(boolean forRestart) { public boolean canExitForge(boolean forRestart) {
String userPrompt = "Are you sure you wish to " + (forRestart ? "restart" : "exit") + " Forge?";
if (this.game != null) { if (this.game != null) {
String userPrompt = "A game is currently active. Are you sure you wish to " + (forRestart ? "restart" : "exit") + " Forge?\n\n"; userPrompt = "A game is currently active. " + userPrompt;
if (!MenuUtil.getUserConfirmation(userPrompt, "Exit Forge")) { }
return false; if (!MenuUtil.getUserConfirmation(userPrompt, "Exit Forge")) {
} return false;
} }
if (!CDeckEditorUI.SINGLETON_INSTANCE.canExit()) { if (!CDeckEditorUI.SINGLETON_INSTANCE.canExit()) {
return false; return false;