mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
finished replacing inplace deck chooser with component
This commit is contained in:
@@ -2,20 +2,13 @@ package forge.gui.home.gauntlet;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.MouseAdapter;
|
|
||||||
import java.awt.event.MouseEvent;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.swing.JList;
|
|
||||||
import javax.swing.ListSelectionModel;
|
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
|
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
@@ -23,7 +16,6 @@ import forge.control.Lobby;
|
|||||||
import forge.deck.Deck;
|
import forge.deck.Deck;
|
||||||
import forge.deck.DeckgenUtil;
|
import forge.deck.DeckgenUtil;
|
||||||
import forge.deck.DeckgenUtil.DeckTypes;
|
import forge.deck.DeckgenUtil.DeckTypes;
|
||||||
import forge.deck.generate.GenerateThemeDeck;
|
|
||||||
import forge.game.GameType;
|
import forge.game.GameType;
|
||||||
import forge.game.MatchController;
|
import forge.game.MatchController;
|
||||||
import forge.game.MatchStartHelper;
|
import forge.game.MatchStartHelper;
|
||||||
@@ -33,9 +25,6 @@ import forge.gauntlet.GauntletIO;
|
|||||||
import forge.gui.SOverlayUtils;
|
import forge.gui.SOverlayUtils;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.model.FModel;
|
import forge.model.FModel;
|
||||||
import forge.quest.QuestController;
|
|
||||||
import forge.quest.QuestEvent;
|
|
||||||
import forge.util.storage.IStorage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the "quick gauntlet" submenu in the home UI.
|
* Controls the "quick gauntlet" submenu in the home UI.
|
||||||
@@ -49,31 +38,6 @@ public enum CSubmenuGauntletQuick implements ICDoc {
|
|||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
private final MouseAdapter madDecklist = new MouseAdapter() {
|
|
||||||
@Override
|
|
||||||
public void mouseClicked(final MouseEvent e) {
|
|
||||||
if (e.getClickCount() == 2) {
|
|
||||||
if (view.getRadColorDecks().isSelected()) { return; }
|
|
||||||
if (view.getRadThemeDecks().isSelected()) { return; }
|
|
||||||
|
|
||||||
DeckgenUtil.showDecklist(((JList) e.getSource())); }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final Command cmdRandomRegular = new Command() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
DeckgenUtil.randomSelect(view.getLstDecks());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final Command cmdRandomColors = new Command() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
view.getLstDecks().setSelectedIndices(DeckgenUtil.randomSelectColors());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final ActionListener actStartGame = new ActionListener() { @Override
|
private final ActionListener actStartGame = new ActionListener() { @Override
|
||||||
public void actionPerformed(ActionEvent arg0) { startGame(); } };
|
public void actionPerformed(ActionEvent arg0) { startGame(); } };
|
||||||
|
|
||||||
@@ -94,48 +58,14 @@ public enum CSubmenuGauntletQuick implements ICDoc {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
final ActionListener deckUpdate = new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(final ActionEvent arg0) {
|
|
||||||
updateDecks(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
view.getBtnStart().addActionListener(actStartGame);
|
view.getBtnStart().addActionListener(actStartGame);
|
||||||
view.getLstDecks().addMouseListener(madDecklist);
|
|
||||||
|
|
||||||
// Deck list and radio button event handling
|
|
||||||
view.getRadUserDecks().setSelected(true);
|
|
||||||
|
|
||||||
view.getRadQuestDecks().addActionListener(deckUpdate);
|
|
||||||
view.getRadColorDecks().addActionListener(deckUpdate);
|
|
||||||
view.getRadThemeDecks().addActionListener(deckUpdate);
|
|
||||||
view.getRadUserDecks().addActionListener(deckUpdate);
|
|
||||||
|
|
||||||
updateDecks();
|
|
||||||
updateData();
|
updateData();
|
||||||
|
|
||||||
view.getGauntletLister().setSelectedIndex(0);
|
view.getGauntletLister().setSelectedIndex(0);
|
||||||
|
view.getLstDecks().initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handles all control for "custom" radio button click. */
|
|
||||||
private void updateDecks() {
|
|
||||||
if (view.getRadUserDecks().isSelected()) {
|
|
||||||
view.getBtnRandom().setCommand(cmdRandomRegular);
|
|
||||||
updateUserDecks();
|
|
||||||
}
|
|
||||||
else if (view.getRadQuestDecks().isSelected()) {
|
|
||||||
view.getBtnRandom().setCommand(cmdRandomRegular);
|
|
||||||
updateQuestDecks();
|
|
||||||
}
|
|
||||||
else if (view.getRadThemeDecks().isSelected()) {
|
|
||||||
view.getBtnRandom().setCommand(cmdRandomRegular);
|
|
||||||
updateThemeDecks();
|
|
||||||
}
|
|
||||||
else if (view.getRadColorDecks().isSelected()) {
|
|
||||||
view.getBtnRandom().setCommand(cmdRandomColors);
|
|
||||||
updateColorDecks();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateData() {
|
private void updateData() {
|
||||||
final File[] files = GauntletIO.getGauntletFilesUnlocked();
|
final File[] files = GauntletIO.getGauntletFilesUnlocked();
|
||||||
@@ -148,64 +78,6 @@ public enum CSubmenuGauntletQuick implements ICDoc {
|
|||||||
view.getGauntletLister().setGauntlets(data);
|
view.getGauntletLister().setGauntlets(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateUserDecks() {
|
|
||||||
final List<String> customNames = new ArrayList<String>();
|
|
||||||
final IStorage<Deck> allDecks = Singletons.getModel().getDecks().getConstructed();
|
|
||||||
for (final Deck d : allDecks) { customNames.add(d.getName()); }
|
|
||||||
|
|
||||||
view.getLstDecks().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
view.getLstDecks().setListData(customNames.toArray(ArrayUtils.EMPTY_STRING_ARRAY));
|
|
||||||
view.getLstDecks().setName(DeckTypes.CUSTOM.toString());
|
|
||||||
|
|
||||||
// Init first in list
|
|
||||||
view.getLstDecks().setSelectedIndex(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Handles all control for "quest event" radio button click. */
|
|
||||||
private void updateQuestDecks() {
|
|
||||||
final List<String> eventNames = new ArrayList<String>();
|
|
||||||
QuestController quest = Singletons.getModel().getQuest();
|
|
||||||
|
|
||||||
for (final QuestEvent e : quest.getDuelsManager().getAllDuels()) {
|
|
||||||
eventNames.add(e.getEventDeck().getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
for (final QuestEvent e : quest.getChallenges()) {
|
|
||||||
eventNames.add(e.getEventDeck().getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
view.getLstDecks().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
view.getLstDecks().setListData(eventNames.toArray(ArrayUtils.EMPTY_STRING_ARRAY));
|
|
||||||
view.getLstDecks().setName(DeckTypes.QUESTEVENTS.toString());
|
|
||||||
|
|
||||||
// Init first in list
|
|
||||||
view.getLstDecks().setSelectedIndex(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Handles all control for "themes" radio button click. */
|
|
||||||
private void updateThemeDecks() {
|
|
||||||
final List<String> themeNames = new ArrayList<String>();
|
|
||||||
for (final String s : GenerateThemeDeck.getThemeNames()) { themeNames.add(s); }
|
|
||||||
|
|
||||||
view.getLstDecks().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
view.getLstDecks().setListData(themeNames.toArray(ArrayUtils.EMPTY_STRING_ARRAY));
|
|
||||||
view.getLstDecks().setName(DeckTypes.THEMES.toString());
|
|
||||||
|
|
||||||
// Init first in list
|
|
||||||
view.getLstDecks().setSelectedIndex(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Handles all control for "colors" radio button click. */
|
|
||||||
private void updateColorDecks() {
|
|
||||||
view.getLstDecks().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
|
||||||
view.getLstDecks().setListData(new String[] {"Random 1", "Random 2", "Random 3",
|
|
||||||
"Random 4", "Black", "Blue", "Green", "Red", "White"});
|
|
||||||
view.getLstDecks().setName(DeckTypes.COLORS.toString());
|
|
||||||
|
|
||||||
// Init basic two color deck
|
|
||||||
view.getLstDecks().setSelectedIndices(new int[]{0, 1});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startGame() {
|
private void startGame() {
|
||||||
// Start game overlay
|
// Start game overlay
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
@@ -226,23 +98,7 @@ public enum CSubmenuGauntletQuick implements ICDoc {
|
|||||||
FModel.SINGLETON_INSTANCE.getGauntletData().setName(GauntletIO.PREFIX_QUICK + num);
|
FModel.SINGLETON_INSTANCE.getGauntletData().setName(GauntletIO.PREFIX_QUICK + num);
|
||||||
|
|
||||||
// Pull user deck
|
// Pull user deck
|
||||||
final Deck userDeck;
|
final Deck userDeck = view.getLstDecks().getDeck().getOriginalDeck();
|
||||||
final String[] selection = Arrays.asList(
|
|
||||||
view.getLstDecks().getSelectedValues()).toArray(new String[0]);
|
|
||||||
|
|
||||||
if (view.getRadColorDecks().isSelected()) {
|
|
||||||
if (!DeckgenUtil.colorCheck(selection)) { return; }
|
|
||||||
userDeck = DeckgenUtil.buildColorDeck(selection, PlayerType.HUMAN);
|
|
||||||
}
|
|
||||||
else if (view.getRadQuestDecks().isSelected()) {
|
|
||||||
userDeck = DeckgenUtil.buildQuestDeck(selection);
|
|
||||||
}
|
|
||||||
else if (view.getRadThemeDecks().isSelected()) {
|
|
||||||
userDeck = DeckgenUtil.buildThemeDeck(selection);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
userDeck = DeckgenUtil.getConstructedDeck(selection);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate gauntlet decks
|
// Generate gauntlet decks
|
||||||
final int numOpponents = view.getSliOpponents().getValue();
|
final int numOpponents = view.getSliOpponents().getValue();
|
||||||
|
|||||||
@@ -2,19 +2,16 @@ package forge.gui.home.gauntlet;
|
|||||||
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
|
||||||
import javax.swing.ButtonGroup;
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JCheckBox;
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JList;
|
|
||||||
import javax.swing.JRadioButton;
|
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JSlider;
|
import javax.swing.JSlider;
|
||||||
import javax.swing.ListSelectionModel;
|
|
||||||
import javax.swing.ScrollPaneConstants;
|
import javax.swing.ScrollPaneConstants;
|
||||||
import javax.swing.SwingConstants;
|
import javax.swing.SwingConstants;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
import forge.game.player.PlayerType;
|
||||||
import forge.gui.framework.DragCell;
|
import forge.gui.framework.DragCell;
|
||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
@@ -23,11 +20,9 @@ import forge.gui.home.IVSubmenu;
|
|||||||
import forge.gui.home.StartButton;
|
import forge.gui.home.StartButton;
|
||||||
import forge.gui.home.VHomeUI;
|
import forge.gui.home.VHomeUI;
|
||||||
import forge.gui.toolbox.FCheckBox;
|
import forge.gui.toolbox.FCheckBox;
|
||||||
|
import forge.gui.toolbox.FDeckChooser;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FList;
|
|
||||||
import forge.gui.toolbox.FPanel;
|
import forge.gui.toolbox.FPanel;
|
||||||
import forge.gui.toolbox.FRadioButton;
|
|
||||||
import forge.gui.toolbox.FScrollPane;
|
|
||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +41,6 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
|
|
||||||
// Other fields
|
// Other fields
|
||||||
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 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)
|
||||||
.opaque(true).fontSize(16).build();
|
.opaque(true).fontSize(16).build();
|
||||||
@@ -63,24 +57,14 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
private final JCheckBox boxColorDecks = new FCheckBox("Fully random color Decks");
|
private final JCheckBox boxColorDecks = new FCheckBox("Fully random color Decks");
|
||||||
private final JCheckBox boxThemeDecks = new FCheckBox("Semi-random theme Decks");
|
private final JCheckBox boxThemeDecks = new FCheckBox("Semi-random theme Decks");
|
||||||
|
|
||||||
private final JRadioButton radUserDecks = new FRadioButton("Custom user decks");
|
private final FDeckChooser lstDecks = new FDeckChooser("Deck", PlayerType.HUMAN);
|
||||||
private final JRadioButton radQuestDecks = new FRadioButton("Quest Events");
|
|
||||||
private final JRadioButton radRandomColor = new FRadioButton("Fully random colors");
|
|
||||||
private final JRadioButton radThemeDecks = new FRadioButton("Semi-random themes");
|
|
||||||
|
|
||||||
private final JList lstDecks = new FList();
|
|
||||||
private final QuickGauntletLister gauntletList = new QuickGauntletLister();
|
private final QuickGauntletLister gauntletList = new QuickGauntletLister();
|
||||||
|
|
||||||
private final JLabel lblOptions = new FLabel.Builder().fontSize(16)
|
private final JLabel lblOptions = new FLabel.Builder().fontSize(16)
|
||||||
.fontStyle(Font.BOLD).text("OPTIONS").fontAlign(SwingConstants.CENTER).build();
|
.fontStyle(Font.BOLD).text("OPTIONS").fontAlign(SwingConstants.CENTER).build();
|
||||||
|
|
||||||
private final JLabel lblDeck = new FLabel.Builder().fontSize(16)
|
|
||||||
.fontStyle(Font.BOLD).text("DECK").fontAlign(SwingConstants.CENTER).build();
|
|
||||||
|
|
||||||
private final FLabel btnRandom = new FLabel.Builder()
|
|
||||||
.text("Random").hoverable(true).build();
|
|
||||||
|
|
||||||
private final JScrollPane scrDecks = new FScrollPane(lstDecks);
|
|
||||||
private final JScrollPane scrLoad = new JScrollPane(gauntletList,
|
private final JScrollPane scrLoad = new JScrollPane(gauntletList,
|
||||||
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
|
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
|
||||||
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||||
@@ -105,6 +89,7 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
boxThemeDecks.setSelected(true);
|
boxThemeDecks.setSelected(true);
|
||||||
boxColorDecks.setSelected(true);
|
boxColorDecks.setSelected(true);
|
||||||
|
|
||||||
|
|
||||||
sliOpponents.setMajorTickSpacing(5);
|
sliOpponents.setMajorTickSpacing(5);
|
||||||
sliOpponents.setMinorTickSpacing(0);
|
sliOpponents.setMinorTickSpacing(0);
|
||||||
sliOpponents.setPaintTicks(false);
|
sliOpponents.setPaintTicks(false);
|
||||||
@@ -114,21 +99,12 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
sliOpponents.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
sliOpponents.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
||||||
sliOpponents.setFont(FSkin.getFont(12));
|
sliOpponents.setFont(FSkin.getFont(12));
|
||||||
|
|
||||||
btnRandom.setOpaque(true);
|
|
||||||
|
|
||||||
scrLoad.setOpaque(false);
|
scrLoad.setOpaque(false);
|
||||||
scrLoad.getViewport().setOpaque(false);
|
scrLoad.getViewport().setOpaque(false);
|
||||||
scrLoad.setBorder(null);
|
scrLoad.setBorder(null);
|
||||||
|
|
||||||
// Radio button grouping
|
|
||||||
final ButtonGroup grpRadDecks = new ButtonGroup();
|
|
||||||
grpRadDecks.add(radUserDecks);
|
|
||||||
grpRadDecks.add(radQuestDecks);
|
|
||||||
grpRadDecks.add(radRandomColor);
|
|
||||||
grpRadDecks.add(radThemeDecks);
|
|
||||||
|
|
||||||
lstDecks.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
|
|
||||||
pnlOptions.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
pnlOptions.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||||
pnlOptions.add(lblOptions, "h 30px!, w 96%!, gap 2% 0 0 5px");
|
pnlOptions.add(lblOptions, "h 30px!, w 96%!, gap 2% 0 0 5px");
|
||||||
pnlOptions.add(sliOpponents, "h 40px!, w 96%!, gap 2% 0 0 5px, ax center");
|
pnlOptions.add(sliOpponents, "h 40px!, w 96%!, gap 2% 0 0 5px, ax center");
|
||||||
@@ -139,17 +115,6 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
pnlOptions.add(boxQuestDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
pnlOptions.add(boxQuestDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
||||||
pnlOptions.add(boxThemeDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
pnlOptions.add(boxThemeDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
||||||
pnlOptions.add(boxColorDecks, "w 96%!, h 30px!, gap 2% 0 0 0");
|
pnlOptions.add(boxColorDecks, "w 96%!, h 30px!, gap 2% 0 0 0");
|
||||||
|
|
||||||
pnlDecks.setLayout(new MigLayout("insets 0, gap 0, wrap"));
|
|
||||||
pnlDecks.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
|
||||||
pnlDecks.setCornerDiameter(0);
|
|
||||||
pnlDecks.add(lblDeck, "h 30px!, w 94%!, gap 1% 0 0 5px, ax center");
|
|
||||||
pnlDecks.add(radUserDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
|
||||||
pnlDecks.add(radQuestDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
|
||||||
pnlDecks.add(radRandomColor, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
|
||||||
pnlDecks.add(radThemeDecks, "w 96%!, h 30px!, gap 2% 0 0 5px");
|
|
||||||
pnlDecks.add(btnRandom, "h 30px!, w 200px!, gap 25% 0 0 10px");
|
|
||||||
pnlDecks.add(scrDecks, "w 94%!, pushy, growy, gap 3% 0 0 10px");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -188,15 +153,17 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lblDesc, "ax center, gap 0 0 0 5px, span 2");
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lblDesc, "ax center, gap 0 0 0 5px, span 2");
|
||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lblDecklist, "ax center, gap 0 0 0 15px, span 2");
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lblDecklist, "ax center, gap 0 0 0 15px, span 2");
|
||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(pnlOptions, "w 40%!, gap 1% 1% 0 0, pushy, growy");
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(pnlOptions, "w 40%!, gap 1% 1% 0 0, pushy, growy");
|
||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(pnlDecks, "w 57%!, pushy, growy");
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lstDecks, "w 57%!, pushy, growy");
|
||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(btnStart, "w 98%!, ax center, gap 1% 0 20px 20px, span 2");
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(btnStart, "w 98%!, ax center, gap 1% 0 20px 20px, span 2");
|
||||||
|
|
||||||
|
getLstDecks().populate();
|
||||||
|
|
||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().repaintSelf();
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().repaintSelf();
|
||||||
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().revalidate();
|
VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().revalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link javax.swing.JList} */
|
/** @return {@link javax.swing.JList} */
|
||||||
public JList getLstDecks() {
|
public FDeckChooser getLstDecks() {
|
||||||
return this.lstDecks;
|
return this.lstDecks;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,37 +191,11 @@ public enum VSubmenuGauntletQuick implements IVSubmenu<CSubmenuGauntletQuick> {
|
|||||||
public JCheckBox getBoxThemeDecks() {
|
public JCheckBox getBoxThemeDecks() {
|
||||||
return boxThemeDecks;
|
return boxThemeDecks;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link javax.swing.JRadioButton} */
|
|
||||||
public JRadioButton getRadUserDecks() {
|
|
||||||
return this.radUserDecks;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JRadioButton} */
|
|
||||||
public JRadioButton getRadQuestDecks() {
|
|
||||||
return this.radQuestDecks;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JRadioButton} */
|
|
||||||
public JRadioButton getRadColorDecks() {
|
|
||||||
return this.radRandomColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JRadioButton} */
|
|
||||||
public JRadioButton getRadThemeDecks() {
|
|
||||||
return this.radThemeDecks;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JSlider} */
|
/** @return {@link javax.swing.JSlider} */
|
||||||
public JSlider getSliOpponents() {
|
public JSlider getSliOpponents() {
|
||||||
return this.sliOpponents;
|
return this.sliOpponents;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return {@link forge.gui.toolbox.FLabel} */
|
|
||||||
public FLabel getBtnRandom() {
|
|
||||||
return this.btnRandom;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return {@link javax.swing.JButton} */
|
/** @return {@link javax.swing.JButton} */
|
||||||
public JButton getBtnStart() {
|
public JButton getBtnStart() {
|
||||||
return this.btnStart;
|
return this.btnStart;
|
||||||
|
|||||||
Reference in New Issue
Block a user