Fix so Cancel button text restored for certain inputs

This commit is contained in:
drdev
2014-05-31 16:25:59 +00:00
parent c4ec40aa55
commit 4029d0d452
2 changed files with 2 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ public abstract class InputSelectManyBase<T extends GameEntity> extends InputSyn
boolean canCancel = allowCancel;
boolean canOk = hasEnoughTargets();
ButtonUtil.reset();
if (canOk && canCancel) { ButtonUtil.enableAllFocusOk(); }
if (!canOk && canCancel) { ButtonUtil.enableOnlyCancel(); }
if (canOk && !canCancel) { ButtonUtil.enableOnlyOk(); }

View File

@@ -74,6 +74,7 @@ public final class InputSelectTargets extends InputSyncronizedBase {
showMessage(sb.toString());
// If reached Minimum targets, enable OK button
ButtonUtil.reset();
if (!tgt.isMinTargetsChosen(sa.getHostCard(), sa) || tgt.isDividedAsYouChoose()) {
if (mandatory && tgt.hasCandidates(sa, true)) {
// Player has to click on a target