mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Updates to ViewConstructed in home screen.
This commit is contained in:
@@ -143,6 +143,9 @@ public class ControlAllUI {
|
||||
private void sizeChildren() {
|
||||
Component[] children;
|
||||
children = ControlAllUI.this.display.getComponentsInLayer(JLayeredPane.DEFAULT_LAYER);
|
||||
|
||||
if (children.length == 0) { return; }
|
||||
|
||||
children[0].setSize(ControlAllUI.this.display.getSize());
|
||||
|
||||
children = ControlAllUI.this.display.getComponentsInLayer(JLayeredPane.MODAL_LAYER);
|
||||
|
||||
@@ -5,7 +5,9 @@ import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
@@ -74,9 +76,21 @@ public class ViewConstructed extends JPanel {
|
||||
// Content menu
|
||||
String[] colors = {"Random", "Random", "Random",
|
||||
"Random", "Black", "Blue", "Green", "Red", "White"};
|
||||
String[] decks = objectArrayToStringArray(AllZone.getDeckManager().getConstructedDecks().toArray());
|
||||
|
||||
String[] themes = objectArrayToStringArray(gen.getThemeNames().toArray());
|
||||
|
||||
Deck d;
|
||||
List<String> decknames = new ArrayList<String>();
|
||||
for (final Deck allDeck : AllZone.getDeckManager().getDecks()) {
|
||||
d = allDeck;
|
||||
|
||||
if (d.getDeckType().equals(GameType.Constructed)) {
|
||||
decknames.add(d.getName());
|
||||
}
|
||||
} // for
|
||||
|
||||
String[] decks = objectArrayToStringArray(decknames.toArray());
|
||||
|
||||
lstColorsHuman = new JList(colors);
|
||||
lstColorsAI = new JList(colors);
|
||||
lstDecksHuman = new JList(decks);
|
||||
|
||||
Reference in New Issue
Block a user