mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Fixed InputSelectMany.
This commit is contained in:
@@ -5,9 +5,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
|
||||||
import com.google.common.base.Predicate;
|
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
|
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ public abstract class InputSelectMany<T extends GameEntity> extends Input {
|
|||||||
protected Input onCancel() { return null; }
|
protected Input onCancel() { return null; }
|
||||||
protected boolean canCancelWithSomethingSelected() { return false; }
|
protected boolean canCancelWithSomethingSelected() { return false; }
|
||||||
protected boolean hasEnoughTargets() { return selected.size() >= min; }
|
protected boolean hasEnoughTargets() { return selected.size() >= min; }
|
||||||
|
protected boolean hasAllTargets() { return selected.size() >= max; }
|
||||||
|
|
||||||
|
|
||||||
protected void selectEntity(T c)
|
protected void selectEntity(T c)
|
||||||
@@ -116,7 +117,7 @@ public abstract class InputSelectMany<T extends GameEntity> extends Input {
|
|||||||
this.selected.add(c);
|
this.selected.add(c);
|
||||||
this.showMessage();
|
this.showMessage();
|
||||||
|
|
||||||
if ( hasEnoughTargets() )
|
if ( hasAllTargets() )
|
||||||
selectButtonOK();
|
selectButtonOK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user