mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Update buttons on concede, restart, and exit prompts
This commit is contained in:
@@ -172,11 +172,12 @@ public enum FControl implements KeyEventDispatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean canExitForge(boolean forRestart) {
|
public boolean canExitForge(boolean forRestart) {
|
||||||
|
String action = (forRestart ? "Restart" : "Exit");
|
||||||
String userPrompt = "Are you sure you wish to " + (forRestart ? "restart" : "exit") + " Forge?";
|
String userPrompt = "Are you sure you wish to " + (forRestart ? "restart" : "exit") + " Forge?";
|
||||||
if (this.game != null) {
|
if (this.game != null) {
|
||||||
userPrompt = "A game is currently active. " + userPrompt;
|
userPrompt = "A game is currently active. " + userPrompt;
|
||||||
}
|
}
|
||||||
if (!FOptionPane.showConfirmDialog(userPrompt, "Exit Forge", this.game == null)) { //default Yes if no game active
|
if (!FOptionPane.showConfirmDialog(userPrompt, action + " Forge", action, "Cancel", this.game == null)) { //default Yes if no game active
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!CDeckEditorUI.SINGLETON_INSTANCE.canSwitchAway(true)) {
|
if (!CDeckEditorUI.SINGLETON_INSTANCE.canSwitchAway(true)) {
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ public enum CMatchUI implements ICDoc, IMenuProvider {
|
|||||||
String userPrompt =
|
String userPrompt =
|
||||||
"This will end the current game and you will not be able to resume.\n\n" +
|
"This will end the current game and you will not be able to resume.\n\n" +
|
||||||
"Concede anyway?";
|
"Concede anyway?";
|
||||||
if (FOptionPane.showConfirmDialog(userPrompt, "Concede Game?", false)) {
|
if (FOptionPane.showConfirmDialog(userPrompt, "Concede Game?", "Concede", "Cancel", false)) {
|
||||||
Singletons.getControl().stopGame();
|
Singletons.getControl().stopGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user