A number of inputs recieve stop(); clause

This commit is contained in:
Maxmtg
2013-03-02 07:50:01 +00:00
parent ef7355859e
commit 4ae49efb4a
6 changed files with 14 additions and 8 deletions

View File

@@ -106,6 +106,7 @@ public class InputBlock extends Input {
currentAttacker = null; currentAttacker = null;
allBlocking.clear(); allBlocking.clear();
stop();
FControl.SINGLETON_INSTANCE.getPlayer().getController().passPriority(); FControl.SINGLETON_INSTANCE.getPlayer().getController().passPriority();
} }
} }

View File

@@ -59,6 +59,7 @@ public class InputCleanup extends Input {
// goes to the next phase // goes to the next phase
if (active.isUnlimitedHandSize() || n <= max || n <= 0 || active != turnOwner) { if (active.isUnlimitedHandSize() || n <= max || n <= 0 || active != turnOwner) {
active.getController().passPriority(); active.getController().passPriority();
stop();
return; return;
} }
ButtonUtil.disableAll(); ButtonUtil.disableAll();

View File

@@ -25,7 +25,7 @@ import forge.game.phase.PhaseType;
import forge.game.player.Player; import forge.game.player.Player;
import forge.game.player.PlayerController; import forge.game.player.PlayerController;
import forge.game.zone.MagicStack; import forge.game.zone.MagicStack;
import forge.util.MyObservable; import forge.gui.match.controllers.CMessage;
/** /**
* <p> * <p>
@@ -35,7 +35,7 @@ import forge.util.MyObservable;
* @author Forge * @author Forge
* @version $Id$ * @version $Id$
*/ */
public class InputControl extends MyObservable implements java.io.Serializable { public class InputControl implements java.io.Serializable {
/** Constant <code>serialVersionUID=3955194449319994301L</code>. */ /** Constant <code>serialVersionUID=3955194449319994301L</code>. */
private static final long serialVersionUID = 3955194449319994301L; private static final long serialVersionUID = 3955194449319994301L;
@@ -134,12 +134,13 @@ public class InputControl extends MyObservable implements java.io.Serializable {
* @param update * @param update
* a boolean. * a boolean.
*/ */
public final void resetInput() { resetInput(true); } public final void resetInput() {
public final void resetInput(final boolean update) {
this.input = null; this.input = null;
if (update) { this.updateObservers();
this.updateObservers(); }
}
private void updateObservers() {
CMessage.SINGLETON_INSTANCE.getInputControl().invalidate();
} }
/** /**

View File

@@ -179,6 +179,7 @@ public class InputMulligan extends Input {
SDisplayUtil.showTab(nextField); SDisplayUtil.showTab(nextField);
game.getPhaseHandler().nextPhase(); game.getPhaseHandler().nextPhase();
stop();
} }
@Override @Override

View File

@@ -75,6 +75,7 @@ public class InputPassPriority extends Input {
@Override @Override
public final void selectButtonOK() { public final void selectButtonOK() {
FControl.SINGLETON_INSTANCE.getPlayer().getController().passPriority(); FControl.SINGLETON_INSTANCE.getPlayer().getController().passPriority();
stop();
} }
/** {@inheritDoc} */ /** {@inheritDoc} */

View File

@@ -108,6 +108,7 @@ public class AiInputCommon extends Input {
} }
} }
player.getController().passPriority(); player.getController().passPriority();
stop();
} // getMessage(); } // getMessage();
/** /**