mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix Ponder crash
This commit is contained in:
@@ -6,11 +6,13 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
|
|
||||||
import forge.Forge;
|
import forge.Forge;
|
||||||
import forge.Graphics;
|
import forge.Graphics;
|
||||||
import forge.GuiBase;
|
import forge.GuiBase;
|
||||||
@@ -444,7 +446,10 @@ public class MatchController extends AbstractGuiGame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean confirm(final CardView c, final String question, final boolean defaultIsYes, final String[] options) {
|
public boolean confirm(final CardView c, final String question, final boolean defaultIsYes, String[] options) {
|
||||||
|
if (options == null) {
|
||||||
|
options = new String[] { "Yes", "No" };
|
||||||
|
}
|
||||||
return FOptionPane.showCardOptionDialog(c, question, "", SOptionPane.INFORMATION_ICON, options, defaultIsYes ? 1 : 0) == 1;
|
return FOptionPane.showCardOptionDialog(c, question, "", SOptionPane.INFORMATION_ICON, options, defaultIsYes ? 1 : 0) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -589,13 +589,11 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
return showInputDialog(message, title, null, "", null);
|
return showInputDialog(message, title, null, "", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showInputDialog(final String message, final String title, final FSkinProp icon) {
|
public String showInputDialog(final String message, final String title, final FSkinProp icon) {
|
||||||
return showInputDialog(message, title, icon, "", null);
|
return showInputDialog(message, title, icon, "", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showInputDialog(final String message, final String title, final FSkinProp icon, final String initialInput) {
|
public String showInputDialog(final String message, final String title, final FSkinProp icon, final String initialInput) {
|
||||||
return showInputDialog(message, title, icon, initialInput, null);
|
return showInputDialog(message, title, icon, initialInput, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user