Developers' menu - changed order of buttons and groupped on a single line actions of similiar nature

This commit is contained in:
Maxmtg
2013-02-16 20:36:47 +00:00
parent 2cf28435de
commit 5e1a44cfe4
3 changed files with 17 additions and 13 deletions

View File

@@ -35,11 +35,14 @@ import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.border.Border;
import com.google.common.base.Predicates;
import com.google.common.collect.Lists;
import forge.Card;
import forge.CardCharacteristicName;
import forge.CardLists;
import forge.CardPredicates;
import forge.CardUtil;
import forge.Constant;
import forge.CounterType;
@@ -678,7 +681,7 @@ public final class GuiDisplayUtil {
*/
public static void devModeTapPerm() {
final List<Card> play = Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield);
final Object o = GuiChoose.oneOrNone("Choose a permanent", play);
final Object o = GuiChoose.oneOrNone("Choose a permanent", CardLists.filter(play, Predicates.not(CardPredicates.Presets.TAPPED)));
if (null == o) {
return;
} else {
@@ -696,7 +699,7 @@ public final class GuiDisplayUtil {
*/
public static void devModeUntapPerm() {
final List<Card> play = Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield);
final Object o = GuiChoose.oneOrNone("Choose a permanent", play);
final Object o = GuiChoose.oneOrNone("Choose a permanent", CardLists.filter(play, CardPredicates.Presets.TAPPED));
if (null == o) {
return;
} else {

View File

@@ -196,7 +196,6 @@ public enum CMatchUI implements CardContainer {
// If the first blocker can absorb all of the damage, don't show the Assign Damage Frame
Card firstBlocker = blockers.get(0);
if (!attacker.hasKeyword("Deathtouch") && firstBlocker.getLethalDamage() >= damage) {
firstBlocker.addAssignedDamage(damage, attacker);
Map<Card, Integer> res = new HashMap<Card, Integer>();
res.put(firstBlocker, damage);
return res;

View File

@@ -56,15 +56,15 @@ public enum VDev implements IVDoc<CDev> {
private List<JLabel> devLBLs = new ArrayList<JLabel>();
// Top-level containers
private final JPanel viewport = new JPanel(new MigLayout("wrap, insets 0"));
private final JPanel viewport = new JPanel(new MigLayout("wrap, insets 0, ax center"));
private final JScrollPane scroller = new JScrollPane(viewport,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
// Dev labels
private final DevLabel lblMilling = new DevLabel("Loss by Milling: Enabled", "Loss by Milling: Disabled");
private final DevLabel lblUnlimitedLands = new DevLabel("Play Unlimited Lands This Turn: Enabled",
"Play Unlimited Lands This Turn: Disabled");
private final DevLabel lblUnlimitedLands = new DevLabel("Play many lands per Turn: Enabled",
"Play many lands per Turn: Disabled");
private final DevLabel lblGenerateMana = new DevLabel("Generate Mana");
private final DevLabel lblSetupGame = new DevLabel("Setup Game State");
private final DevLabel lblTutor = new DevLabel("Tutor for Card");
@@ -99,18 +99,20 @@ public enum VDev implements IVDoc<CDev> {
scroller.getViewport().setOpaque(false);
viewport.setOpaque(false);
final String constraints = "w 95%!, gap 0 0 5px 0";
final String constraints = "w 95%!, gap 0 0 4px 0";
final String halfConstraints = "w 47%!, gap 0 0 4px 0";
viewport.add(this.lblGenerateMana, constraints);
viewport.add(this.lblTutor, constraints);
viewport.add(this.lblCardToHand, halfConstraints + ", split 2");
viewport.add(this.lblCardToBattlefield, halfConstraints);
viewport.add(this.lblRiggedRoll, constraints);
viewport.add(this.lblMilling, constraints);
viewport.add(this.lblUnlimitedLands, constraints);
viewport.add(this.lblGenerateMana, constraints);
viewport.add(this.lblSetupGame, constraints);
viewport.add(this.lblTutor, constraints);
viewport.add(this.lblCardToHand, constraints);
viewport.add(this.lblCardToBattlefield, constraints);
viewport.add(this.lblCounterPermanent, constraints);
viewport.add(this.lblTapPermanent, constraints);
viewport.add(this.lblUntapPermanent, constraints);
viewport.add(this.lblTapPermanent, halfConstraints + ", split 2");
viewport.add(this.lblUntapPermanent, halfConstraints);
viewport.add(this.lblSetLife, constraints);
viewport.add(this.lblBreakpoint, constraints);
}