Standardizing home screen appearance: Gauntlet submenu (all)

This commit is contained in:
Doublestrike
2012-10-08 10:56:19 +00:00
parent 30f408f028
commit a11aca35ed
4 changed files with 15 additions and 33 deletions

View File

@@ -23,7 +23,6 @@ import forge.gui.home.EMenuGroup;
import forge.gui.home.IVSubmenu;
import forge.gui.toolbox.FLabel;
import forge.gui.toolbox.FList;
import forge.gui.toolbox.FPanel;
import forge.gui.toolbox.FRadioButton;
import forge.gui.toolbox.FScrollPane;
import forge.gui.toolbox.FSkin;
@@ -45,10 +44,9 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
private final DragTab tab = new DragTab("Gauntlet Builder");
// Other fields
private final FPanel pnlTitle = new FPanel();
private final FLabel lblTitle = new FLabel.Builder()
.text("Gauntlet Builder").fontAlign(SwingConstants.CENTER)
.fontSize(16).build();
.opaque(true).fontSize(16).build();
private final JPanel pnlFileHandling = new JPanel(new MigLayout("insets 0, gap 0, align center"));
private final JPanel pnlRadios = new JPanel(new MigLayout("insets 0, gap 0, wrap"));
@@ -128,6 +126,8 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
private final JTextField txfSearch = new FTextField();
private VSubmenuGauntletBuild() {
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
// Radio button grouping
final ButtonGroup grpRadios = new ButtonGroup();
grpRadios.add(radUserDecks);
@@ -135,11 +135,6 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
grpRadios.add(radColorDecks);
grpRadios.add(radThemeDecks);
pnlTitle.setLayout(new MigLayout("insets 0, gap 0"));
pnlTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
pnlTitle.add(lblTitle, "w 100%, h 100%, gap 0 0 0 0");
pnlTitle.setCornerDiameter(0);
// Text areas
txfFilename.setText(GauntletIO.TXF_PROMPT);
txfFilename.setMargin(new Insets(5, 5, 5, 5));
@@ -232,7 +227,7 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
@Override
public void populate() {
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap 3"));
parentCell.getBody().add(pnlTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px, span 3");
parentCell.getBody().add(lblTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px, span 3");
parentCell.getBody().add(pnlFileHandling, "w 98%!, gap 1% 0 1% 5px, span 3");
parentCell.getBody().add(pnlRadios, "w 48% - 20px!, gap 1% 0 0 15px");

View File

@@ -21,7 +21,6 @@ import forge.gui.home.IVSubmenu;
import forge.gui.home.StartButton;
import forge.gui.toolbox.FLabel;
import forge.gui.toolbox.FList;
import forge.gui.toolbox.FPanel;
import forge.gui.toolbox.FRadioButton;
import forge.gui.toolbox.FScrollPane;
import forge.gui.toolbox.FSkin;
@@ -41,10 +40,9 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
private final DragTab tab = new DragTab("Gauntlet Contests");
// Other fields
private final FPanel pnlTitle = new FPanel();
private final FLabel lblTitle = new FLabel.Builder()
.text("Gauntlet Contests").fontAlign(SwingConstants.CENTER)
.fontSize(16).build();
.opaque(true).fontSize(16).build();
private final StartButton btnStart = new StartButton();
@@ -77,6 +75,8 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
.text("A gauntlet that has been started will keep the same deck until it is finished.").build();
private VSubmenuGauntletContests() {
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
// Radio button grouping
final ButtonGroup grpRight = new ButtonGroup();
grpRight.add(radUserDecks);
@@ -84,11 +84,6 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
grpRight.add(radColorDecks);
grpRight.add(radThemeDecks);
pnlTitle.setLayout(new MigLayout("insets 0, gap 0"));
pnlTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
pnlTitle.add(lblTitle, "w 100%, h 100%, gap 0 0 0 0");
pnlTitle.setCornerDiameter(0);
scrLeft.setBorder(null);
pnlLoad.setLayout(new MigLayout("insets 0, gap 0, wrap"));
pnlLoad.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
@@ -139,7 +134,7 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
@Override
public void populate() {
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
parentCell.getBody().add(pnlTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px, span 2");
parentCell.getBody().add(lblTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px, span 2");
parentCell.getBody().add(lblDesc1, "gap 0 0 0 15px, ax center, span 2");

View File

@@ -14,7 +14,6 @@ import forge.gui.home.EMenuGroup;
import forge.gui.home.IVSubmenu;
import forge.gui.home.StartButton;
import forge.gui.toolbox.FLabel;
import forge.gui.toolbox.FPanel;
import forge.gui.toolbox.FScrollPane;
import forge.gui.toolbox.FSkin;
@@ -33,10 +32,9 @@ public enum VSubmenuGauntletLoad implements IVSubmenu {
private final DragTab tab = new DragTab("Quick Gauntlets");
// Other fields
private final FPanel pnlTitle = new FPanel();
private final FLabel lblTitle = new FLabel.Builder()
.text("Load a gauntlet").fontAlign(SwingConstants.CENTER)
.fontSize(16).build();
.opaque(true).fontSize(16).build();
private final QuickGauntletLister gauntletList = new QuickGauntletLister();
@@ -49,10 +47,7 @@ public enum VSubmenuGauntletLoad implements IVSubmenu {
private final StartButton btnStart = new StartButton();
private VSubmenuGauntletLoad() {
pnlTitle.setCornerDiameter(0);
pnlTitle.setLayout(new MigLayout("insets 0, gap 0"));
pnlTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
pnlTitle.add(lblTitle, "w 98%!, h 100%!, gap 1% 0 0 0");
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
scrLoad.setBorder(null);
}
@@ -87,7 +82,7 @@ public enum VSubmenuGauntletLoad implements IVSubmenu {
@Override
public void populate() {
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap"));
parentCell.getBody().add(pnlTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px");
parentCell.getBody().add(lblTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px");
parentCell.getBody().add(lblDesc, "ax center, gap 0 0 0 5px");
parentCell.getBody().add(scrLoad, "w 98%!, gap 1% 0 5px 20px, pushy, growy");
parentCell.getBody().add(btnStart, "w 98%!, ax center, gap 1% 0 20px 20px");

View File

@@ -44,12 +44,11 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
private final DragTab tab = new DragTab("Quick Gauntlets");
// Other fields
private final FPanel pnlTitle = new FPanel();
private final FPanel pnlOptions = new FPanel(new MigLayout("insets 0, gap 0, wrap"));
private final FPanel pnlDecks = new FPanel();
private final FLabel lblTitle = new FLabel.Builder()
.text("Quick Gauntlet Builder").fontAlign(SwingConstants.CENTER)
.fontSize(16).build();
.opaque(true).fontSize(16).build();
private JSlider sliOpponents = new JSlider(JSlider.HORIZONTAL, 5, 50, 20);
//private JSlider sliGamesPerMatch = new JSlider(JSlider.HORIZONTAL, 1, 7, 3);
@@ -94,6 +93,8 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
private final StartButton btnStart = new StartButton();
private VSubmenuGauntletQuick() {
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
boxUserDecks.setSelected(true);
boxQuestDecks.setSelected(true);
boxThemeDecks.setSelected(true);
@@ -132,10 +133,6 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
grpRadDecks.add(radRandomColor);
grpRadDecks.add(radThemeDecks);
pnlTitle.setCornerDiameter(0);
pnlTitle.setLayout(new MigLayout("insets 0, gap 0"));
pnlTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
pnlTitle.add(lblTitle, "w 98%!, h 100%!, gap 1% 0 0 0");
lstDecks.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
pnlOptions.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
@@ -192,7 +189,7 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
@Override
public void populate() {
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
parentCell.getBody().add(pnlTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px, span 2");
parentCell.getBody().add(lblTitle, "w 98%!, h 30px!, gap 1% 0 15px 15px, span 2");
parentCell.getBody().add(lblDesc, "ax center, gap 0 0 0 15px, span 2");
parentCell.getBody().add(pnlOptions, "w 40%!, gap 1% 1% 0 0, pushy, growy");