mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Standardizing home screen appearance: Gauntlet submenu (all)
This commit is contained in:
@@ -23,7 +23,6 @@ import forge.gui.home.EMenuGroup;
|
|||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FList;
|
import forge.gui.toolbox.FList;
|
||||||
import forge.gui.toolbox.FPanel;
|
|
||||||
import forge.gui.toolbox.FRadioButton;
|
import forge.gui.toolbox.FRadioButton;
|
||||||
import forge.gui.toolbox.FScrollPane;
|
import forge.gui.toolbox.FScrollPane;
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
@@ -45,10 +44,9 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
|
|||||||
private final DragTab tab = new DragTab("Gauntlet Builder");
|
private final DragTab tab = new DragTab("Gauntlet Builder");
|
||||||
|
|
||||||
// Other fields
|
// Other fields
|
||||||
private final FPanel pnlTitle = new FPanel();
|
|
||||||
private final FLabel lblTitle = new FLabel.Builder()
|
private final FLabel lblTitle = new FLabel.Builder()
|
||||||
.text("Gauntlet Builder").fontAlign(SwingConstants.CENTER)
|
.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 pnlFileHandling = new JPanel(new MigLayout("insets 0, gap 0, align center"));
|
||||||
private final JPanel pnlRadios = new JPanel(new MigLayout("insets 0, gap 0, wrap"));
|
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 final JTextField txfSearch = new FTextField();
|
||||||
|
|
||||||
private VSubmenuGauntletBuild() {
|
private VSubmenuGauntletBuild() {
|
||||||
|
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
|
|
||||||
// Radio button grouping
|
// Radio button grouping
|
||||||
final ButtonGroup grpRadios = new ButtonGroup();
|
final ButtonGroup grpRadios = new ButtonGroup();
|
||||||
grpRadios.add(radUserDecks);
|
grpRadios.add(radUserDecks);
|
||||||
@@ -135,11 +135,6 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
|
|||||||
grpRadios.add(radColorDecks);
|
grpRadios.add(radColorDecks);
|
||||||
grpRadios.add(radThemeDecks);
|
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
|
// Text areas
|
||||||
txfFilename.setText(GauntletIO.TXF_PROMPT);
|
txfFilename.setText(GauntletIO.TXF_PROMPT);
|
||||||
txfFilename.setMargin(new Insets(5, 5, 5, 5));
|
txfFilename.setMargin(new Insets(5, 5, 5, 5));
|
||||||
@@ -232,7 +227,7 @@ public enum VSubmenuGauntletBuild implements IVSubmenu {
|
|||||||
@Override
|
@Override
|
||||||
public void populate() {
|
public void populate() {
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap 3"));
|
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(pnlFileHandling, "w 98%!, gap 1% 0 1% 5px, span 3");
|
||||||
|
|
||||||
parentCell.getBody().add(pnlRadios, "w 48% - 20px!, gap 1% 0 0 15px");
|
parentCell.getBody().add(pnlRadios, "w 48% - 20px!, gap 1% 0 0 15px");
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import forge.gui.home.IVSubmenu;
|
|||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FList;
|
import forge.gui.toolbox.FList;
|
||||||
import forge.gui.toolbox.FPanel;
|
|
||||||
import forge.gui.toolbox.FRadioButton;
|
import forge.gui.toolbox.FRadioButton;
|
||||||
import forge.gui.toolbox.FScrollPane;
|
import forge.gui.toolbox.FScrollPane;
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
@@ -41,10 +40,9 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
|
|||||||
private final DragTab tab = new DragTab("Gauntlet Contests");
|
private final DragTab tab = new DragTab("Gauntlet Contests");
|
||||||
|
|
||||||
// Other fields
|
// Other fields
|
||||||
private final FPanel pnlTitle = new FPanel();
|
|
||||||
private final FLabel lblTitle = new FLabel.Builder()
|
private final FLabel lblTitle = new FLabel.Builder()
|
||||||
.text("Gauntlet Contests").fontAlign(SwingConstants.CENTER)
|
.text("Gauntlet Contests").fontAlign(SwingConstants.CENTER)
|
||||||
.fontSize(16).build();
|
.opaque(true).fontSize(16).build();
|
||||||
|
|
||||||
private final StartButton btnStart = new StartButton();
|
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();
|
.text("A gauntlet that has been started will keep the same deck until it is finished.").build();
|
||||||
|
|
||||||
private VSubmenuGauntletContests() {
|
private VSubmenuGauntletContests() {
|
||||||
|
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
|
|
||||||
// Radio button grouping
|
// Radio button grouping
|
||||||
final ButtonGroup grpRight = new ButtonGroup();
|
final ButtonGroup grpRight = new ButtonGroup();
|
||||||
grpRight.add(radUserDecks);
|
grpRight.add(radUserDecks);
|
||||||
@@ -84,11 +84,6 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
|
|||||||
grpRight.add(radColorDecks);
|
grpRight.add(radColorDecks);
|
||||||
grpRight.add(radThemeDecks);
|
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);
|
scrLeft.setBorder(null);
|
||||||
pnlLoad.setLayout(new MigLayout("insets 0, gap 0, wrap"));
|
pnlLoad.setLayout(new MigLayout("insets 0, gap 0, wrap"));
|
||||||
pnlLoad.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
pnlLoad.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
@@ -139,7 +134,7 @@ public enum VSubmenuGauntletContests implements IVSubmenu {
|
|||||||
@Override
|
@Override
|
||||||
public void populate() {
|
public void populate() {
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
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");
|
parentCell.getBody().add(lblDesc1, "gap 0 0 0 15px, ax center, span 2");
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import forge.gui.home.EMenuGroup;
|
|||||||
import forge.gui.home.IVSubmenu;
|
import forge.gui.home.IVSubmenu;
|
||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FPanel;
|
|
||||||
import forge.gui.toolbox.FScrollPane;
|
import forge.gui.toolbox.FScrollPane;
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
|
|
||||||
@@ -33,10 +32,9 @@ public enum VSubmenuGauntletLoad implements IVSubmenu {
|
|||||||
private final DragTab tab = new DragTab("Quick Gauntlets");
|
private final DragTab tab = new DragTab("Quick Gauntlets");
|
||||||
|
|
||||||
// Other fields
|
// Other fields
|
||||||
private final FPanel pnlTitle = new FPanel();
|
|
||||||
private final FLabel lblTitle = new FLabel.Builder()
|
private final FLabel lblTitle = new FLabel.Builder()
|
||||||
.text("Load a gauntlet").fontAlign(SwingConstants.CENTER)
|
.text("Load a gauntlet").fontAlign(SwingConstants.CENTER)
|
||||||
.fontSize(16).build();
|
.opaque(true).fontSize(16).build();
|
||||||
|
|
||||||
private final QuickGauntletLister gauntletList = new QuickGauntletLister();
|
private final QuickGauntletLister gauntletList = new QuickGauntletLister();
|
||||||
|
|
||||||
@@ -49,10 +47,7 @@ public enum VSubmenuGauntletLoad implements IVSubmenu {
|
|||||||
private final StartButton btnStart = new StartButton();
|
private final StartButton btnStart = new StartButton();
|
||||||
|
|
||||||
private VSubmenuGauntletLoad() {
|
private VSubmenuGauntletLoad() {
|
||||||
pnlTitle.setCornerDiameter(0);
|
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
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");
|
|
||||||
|
|
||||||
scrLoad.setBorder(null);
|
scrLoad.setBorder(null);
|
||||||
}
|
}
|
||||||
@@ -87,7 +82,7 @@ public enum VSubmenuGauntletLoad implements IVSubmenu {
|
|||||||
@Override
|
@Override
|
||||||
public void populate() {
|
public void populate() {
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap"));
|
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(lblDesc, "ax center, gap 0 0 0 5px");
|
||||||
parentCell.getBody().add(scrLoad, "w 98%!, gap 1% 0 5px 20px, pushy, growy");
|
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");
|
parentCell.getBody().add(btnStart, "w 98%!, ax center, gap 1% 0 20px 20px");
|
||||||
|
|||||||
@@ -44,12 +44,11 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
|
|||||||
private final DragTab tab = new DragTab("Quick Gauntlets");
|
private final DragTab tab = new DragTab("Quick Gauntlets");
|
||||||
|
|
||||||
// Other fields
|
// Other fields
|
||||||
private final FPanel pnlTitle = new FPanel();
|
|
||||||
private final FPanel pnlOptions = new FPanel(new MigLayout("insets 0, gap 0, wrap"));
|
private final FPanel pnlOptions = new FPanel(new MigLayout("insets 0, gap 0, wrap"));
|
||||||
private final FPanel pnlDecks = new FPanel();
|
private final FPanel pnlDecks = new FPanel();
|
||||||
private final FLabel lblTitle = new FLabel.Builder()
|
private final FLabel lblTitle = new FLabel.Builder()
|
||||||
.text("Quick Gauntlet Builder").fontAlign(SwingConstants.CENTER)
|
.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 sliOpponents = new JSlider(JSlider.HORIZONTAL, 5, 50, 20);
|
||||||
//private JSlider sliGamesPerMatch = new JSlider(JSlider.HORIZONTAL, 1, 7, 3);
|
//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 final StartButton btnStart = new StartButton();
|
||||||
|
|
||||||
private VSubmenuGauntletQuick() {
|
private VSubmenuGauntletQuick() {
|
||||||
|
lblTitle.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
|
|
||||||
boxUserDecks.setSelected(true);
|
boxUserDecks.setSelected(true);
|
||||||
boxQuestDecks.setSelected(true);
|
boxQuestDecks.setSelected(true);
|
||||||
boxThemeDecks.setSelected(true);
|
boxThemeDecks.setSelected(true);
|
||||||
@@ -132,10 +133,6 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
|
|||||||
grpRadDecks.add(radRandomColor);
|
grpRadDecks.add(radRandomColor);
|
||||||
grpRadDecks.add(radThemeDecks);
|
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);
|
lstDecks.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
|
||||||
pnlOptions.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
pnlOptions.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
@@ -192,7 +189,7 @@ public enum VSubmenuGauntletQuick implements IVSubmenu {
|
|||||||
@Override
|
@Override
|
||||||
public void populate() {
|
public void populate() {
|
||||||
parentCell.getBody().setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
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(lblDesc, "ax center, gap 0 0 0 15px, span 2");
|
||||||
parentCell.getBody().add(pnlOptions, "w 40%!, gap 1% 1% 0 0, pushy, growy");
|
parentCell.getBody().add(pnlOptions, "w 40%!, gap 1% 1% 0 0, pushy, growy");
|
||||||
|
|||||||
Reference in New Issue
Block a user