mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Don't allow confirm dialog without title
This commit is contained in:
@@ -64,7 +64,6 @@ public interface IGuiGame {
|
||||
void showErrorDialog(String message);
|
||||
void showErrorDialog(String message, String title);
|
||||
|
||||
boolean showConfirmDialog(String message);
|
||||
boolean showConfirmDialog(String message, String title);
|
||||
boolean showConfirmDialog(String message, String title, boolean defaultYes);
|
||||
boolean showConfirmDialog(String message, String title, String yesButtonText, String noButtonText);
|
||||
|
||||
@@ -616,11 +616,6 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
||||
showErrorDialog(message, "Error");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showConfirmDialog(final String message) {
|
||||
return showConfirmDialog(message, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showConfirmDialog(final String message, final String title) {
|
||||
return showConfirmDialog(message, title, true);
|
||||
|
||||
@@ -93,8 +93,7 @@ public class HumanPlay {
|
||||
|
||||
final HumanPlaySpellAbility req = new HumanPlaySpellAbility(controller, sa, payment);
|
||||
req.playAbility(true, false, false);
|
||||
}
|
||||
else if (payManaCostIfNeeded(controller, p, sa)) {
|
||||
} else if (payManaCostIfNeeded(controller, p, sa)) {
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
sa.setHostCard(p.getGame().getAction().moveToStack(source));
|
||||
}
|
||||
|
||||
@@ -1453,7 +1453,7 @@ public class PlayerControllerHuman
|
||||
try {
|
||||
state.initFromGame(game);
|
||||
File f = GuiBase.getInterface().getSaveFile(new File(ForgeConstants.USER_GAMES_DIR, "state.txt"));
|
||||
if (f != null && (!f.exists() || getGui().showConfirmDialog("Overwrite existing file?"))) {
|
||||
if (f != null && (!f.exists() || getGui().showConfirmDialog("Overwrite existing file?", "File exists!"))) {
|
||||
final BufferedWriter bw = new BufferedWriter(new FileWriter(f));
|
||||
bw.write(state.toString());
|
||||
bw.close();
|
||||
|
||||
Reference in New Issue
Block a user