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);
|
||||||
void showErrorDialog(String message, String title);
|
void showErrorDialog(String message, String title);
|
||||||
|
|
||||||
boolean showConfirmDialog(String message);
|
|
||||||
boolean showConfirmDialog(String message, String title);
|
boolean showConfirmDialog(String message, String title);
|
||||||
boolean showConfirmDialog(String message, String title, boolean defaultYes);
|
boolean showConfirmDialog(String message, String title, boolean defaultYes);
|
||||||
boolean showConfirmDialog(String message, String title, String yesButtonText, String noButtonText);
|
boolean showConfirmDialog(String message, String title, String yesButtonText, String noButtonText);
|
||||||
|
|||||||
@@ -616,11 +616,6 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
showErrorDialog(message, "Error");
|
showErrorDialog(message, "Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean showConfirmDialog(final String message) {
|
|
||||||
return showConfirmDialog(message, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean showConfirmDialog(final String message, final String title) {
|
public boolean showConfirmDialog(final String message, final String title) {
|
||||||
return showConfirmDialog(message, title, true);
|
return showConfirmDialog(message, title, true);
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ public class HumanPlay {
|
|||||||
|
|
||||||
final HumanPlaySpellAbility req = new HumanPlaySpellAbility(controller, sa, payment);
|
final HumanPlaySpellAbility req = new HumanPlaySpellAbility(controller, sa, payment);
|
||||||
req.playAbility(true, false, false);
|
req.playAbility(true, false, false);
|
||||||
}
|
} else if (payManaCostIfNeeded(controller, p, sa)) {
|
||||||
else if (payManaCostIfNeeded(controller, p, sa)) {
|
|
||||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||||
sa.setHostCard(p.getGame().getAction().moveToStack(source));
|
sa.setHostCard(p.getGame().getAction().moveToStack(source));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1453,7 +1453,7 @@ public class PlayerControllerHuman
|
|||||||
try {
|
try {
|
||||||
state.initFromGame(game);
|
state.initFromGame(game);
|
||||||
File f = GuiBase.getInterface().getSaveFile(new File(ForgeConstants.USER_GAMES_DIR, "state.txt"));
|
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));
|
final BufferedWriter bw = new BufferedWriter(new FileWriter(f));
|
||||||
bw.write(state.toString());
|
bw.write(state.toString());
|
||||||
bw.close();
|
bw.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user