Updates to ViewConstructed in home screen.

This commit is contained in:
Doublestrike
2011-12-11 08:55:12 +00:00
parent a71de4c330
commit 732307580e
2 changed files with 18 additions and 1 deletions

View File

@@ -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);

View File

@@ -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);