From 5e1a44cfe49eb1c6c42106bb55f9ce9cc75a485d Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Sat, 16 Feb 2013 20:36:47 +0000 Subject: [PATCH] Developers' menu - changed order of buttons and groupped on a single line actions of similiar nature --- src/main/java/forge/gui/GuiDisplayUtil.java | 7 ++++-- src/main/java/forge/gui/match/CMatchUI.java | 1 - src/main/java/forge/gui/match/views/VDev.java | 22 ++++++++++--------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/main/java/forge/gui/GuiDisplayUtil.java b/src/main/java/forge/gui/GuiDisplayUtil.java index 6f7ef29b8a5..610263a94b6 100644 --- a/src/main/java/forge/gui/GuiDisplayUtil.java +++ b/src/main/java/forge/gui/GuiDisplayUtil.java @@ -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 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 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 { diff --git a/src/main/java/forge/gui/match/CMatchUI.java b/src/main/java/forge/gui/match/CMatchUI.java index 20efb4267f0..24cc77b05e2 100644 --- a/src/main/java/forge/gui/match/CMatchUI.java +++ b/src/main/java/forge/gui/match/CMatchUI.java @@ -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 res = new HashMap(); res.put(firstBlocker, damage); return res; diff --git a/src/main/java/forge/gui/match/views/VDev.java b/src/main/java/forge/gui/match/views/VDev.java index d67e7c222ee..615fef73eae 100644 --- a/src/main/java/forge/gui/match/views/VDev.java +++ b/src/main/java/forge/gui/match/views/VDev.java @@ -56,15 +56,15 @@ public enum VDev implements IVDoc { private List devLBLs = new ArrayList(); // 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 { 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); }