move waitForInput after showComponent into showComponent

master
melvin 2013-04-28 16:45:52 +08:00
parent 0260f8c089
commit 48ad17b193
9 changed files with 2 additions and 10 deletions

View File

@ -111,7 +111,6 @@ public class MagicBuybackChoice extends MagicChoice {
"You may pay the buyback " + cost.getText() + '.');
}
});
controller.waitForInput();
isYesClicked = kickerPanel.isYesClicked();
}

View File

@ -134,7 +134,6 @@ public class MagicColorChoice extends MagicChoice {
return new ColorChoicePanel(controller,source);
}
});
controller.waitForInput();
return new Object[]{choicePanel.getColor()};
}
}

View File

@ -155,7 +155,6 @@ public class MagicKickerChoice extends MagicChoice {
return new MultiKickerChoicePanel(controller,source,cost,maximumCount,replicate);
}
});
controller.waitForInput();
count=kickerPanel.getKickerCount();
} else if (maximumCount==1) {
// Single kicker.
@ -164,7 +163,6 @@ public class MagicKickerChoice extends MagicChoice {
return new MayChoicePanel(controller,source,"You may pay the kicker "+cost.getText()+'.');
}
});
controller.waitForInput();
count=kickerPanel.isYesClicked()?1:0;
} else {
count=0;

View File

@ -158,7 +158,6 @@ public class MagicMayChoice extends MagicChoice {
return new MayChoicePanel(controller,source,getDescription());
}
});
controller.waitForInput();
if (!choicePanel.isYesClicked()) {
return choiceResults;
}

View File

@ -92,7 +92,6 @@ public class MagicMulliganChoice extends MagicChoice {
return new MayChoicePanel(controller,source,"You may take a mulligan.");
}
});
controller.waitForInput();
if (choicePanel.isYesClicked()) {
return new Object[]{YES_CHOICE};
}

View File

@ -117,7 +117,6 @@ public class MagicPayManaCostChoice extends MagicChoice {
return new ManaCostXChoicePanel(controller,source,maximumX);
}
});
controller.waitForInput();
x=choicePanel.getValueForX();
} else {
x=0;

View File

@ -182,7 +182,6 @@ public class MagicPlayChoice extends MagicChoice {
return new PlayChoicePanel(controller,activationSource,results);
}
});
controller.waitForInput();
return new Object[]{choicePanel.getResult()};
}
}

View File

@ -87,7 +87,6 @@ public class MagicSimpleMayChoice extends MagicChoice {
return new MayChoicePanel(controller,source,getDescription());
}
});
controller.waitForInput();
if (choicePanel.isYesClicked()) {
return new Object[]{YES_CHOICE};
}

View File

@ -365,7 +365,7 @@ public class GameController {
});
}
public <E extends JComponent> E showComponent(final Callable<E> func) {
public <E extends JComponent> E showComponent(final Callable<E> func) throws UndoClickedException {
final LinkedList<E> results = new LinkedList<E>();
invokeAndWait(new Runnable() {
public void run() {
@ -378,6 +378,7 @@ public class GameController {
}
}
});
waitForInput();
return results.getFirst();
}