move waitForInput after showComponent into showComponent
parent
0260f8c089
commit
48ad17b193
|
@ -111,7 +111,6 @@ public class MagicBuybackChoice extends MagicChoice {
|
|||
"You may pay the buyback " + cost.getText() + '.');
|
||||
}
|
||||
});
|
||||
controller.waitForInput();
|
||||
isYesClicked = kickerPanel.isYesClicked();
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,6 @@ public class MagicColorChoice extends MagicChoice {
|
|||
return new ColorChoicePanel(controller,source);
|
||||
}
|
||||
});
|
||||
controller.waitForInput();
|
||||
return new Object[]{choicePanel.getColor()};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -158,7 +158,6 @@ public class MagicMayChoice extends MagicChoice {
|
|||
return new MayChoicePanel(controller,source,getDescription());
|
||||
}
|
||||
});
|
||||
controller.waitForInput();
|
||||
if (!choicePanel.isYesClicked()) {
|
||||
return choiceResults;
|
||||
}
|
||||
|
|
|
@ -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};
|
||||
}
|
||||
|
|
|
@ -117,7 +117,6 @@ public class MagicPayManaCostChoice extends MagicChoice {
|
|||
return new ManaCostXChoicePanel(controller,source,maximumX);
|
||||
}
|
||||
});
|
||||
controller.waitForInput();
|
||||
x=choicePanel.getValueForX();
|
||||
} else {
|
||||
x=0;
|
||||
|
|
|
@ -182,7 +182,6 @@ public class MagicPlayChoice extends MagicChoice {
|
|||
return new PlayChoicePanel(controller,activationSource,results);
|
||||
}
|
||||
});
|
||||
controller.waitForInput();
|
||||
return new Object[]{choicePanel.getResult()};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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};
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue