mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Always prompt user before exiting or restarting Forge
This commit is contained in:
@@ -136,12 +136,13 @@ 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")) {
|
if (!MenuUtil.getUserConfirmation(userPrompt, "Exit Forge")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!CDeckEditorUI.SINGLETON_INSTANCE.canExit()) {
|
if (!CDeckEditorUI.SINGLETON_INSTANCE.canExit()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user