*Prettyfied my previous addition.

This commit is contained in:
Hellfish
2013-11-21 21:10:41 +00:00
parent 482af12b67
commit f537e8cf78
4 changed files with 44 additions and 39 deletions

View File

@@ -135,8 +135,12 @@ public enum VSubmenuArchenemy implements IVSubmenu<CSubmenuArchenemy> {
FRadioButton tmpHuman = new FRadioButton(); FRadioButton tmpHuman = new FRadioButton();
tmpHuman.setText("Human"); tmpHuman.setText("Human");
tmpHuman.setSelected(i == 0); tmpHuman.setSelected(i == 0);
tempPanel.add(tmpAI);
tempPanel.add(tmpHuman,"wrap"); FPanel typeBtnPanel = new FPanel();
typeBtnPanel.add(tmpAI);
typeBtnPanel.add(tmpHuman,"wrap");
tempPanel.add(typeBtnPanel);
tempBtnGroup.add(tmpAI); tempBtnGroup.add(tmpAI);
tempBtnGroup.add(tmpHuman); tempBtnGroup.add(tmpHuman);
playerIsAIRadios.add(tmpAI); playerIsAIRadios.add(tmpAI);
@@ -153,11 +157,8 @@ public enum VSubmenuArchenemy implements IVSubmenu<CSubmenuArchenemy> {
} }
playerPanels.add(tempPanel); playerPanels.add(tempPanel);
if (i == 0) {
tabPane.add("Human", tempPanel); tabPane.add("Player " + (i+1), tempPanel);
} else {
tabPane.add("Opponent " + i, tempPanel);
}
} }
final String strCheckboxConstraints = "h 30px!, gap 0 20px 0 0"; final String strCheckboxConstraints = "h 30px!, gap 0 20px 0 0";
@@ -184,7 +185,7 @@ public enum VSubmenuArchenemy implements IVSubmenu<CSubmenuArchenemy> {
} }
else { else {
for (int i = currentNumTabsShown; i <= toShow; i++) { for (int i = currentNumTabsShown; i <= toShow; i++) {
tabPane.add("Opponent " + i, playerPanels.get(i)); tabPane.add("Player " + i, playerPanels.get(i));
} }
currentNumTabsShown = tabPane.getComponentCount() - 1; currentNumTabsShown = tabPane.getComponentCount() - 1;
} }

View File

@@ -126,7 +126,7 @@ public enum VSubmenuCommander implements IVSubmenu<CSubmenuCommander> {
//Player panels (Human + 7 AIs) //Player panels (Human + 7 AIs)
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
tempPanel = new FPanel(); tempPanel = new FPanel();
tempPanel.setLayout(new MigLayout("insets 0, gap 0 , wrap 2, flowy, ax center")); tempPanel.setLayout(new MigLayout("insets 0, gap 0 , wrap 2, flowx, ax center"));
tempList = new FList<Object>(); tempList = new FList<Object>();
@@ -143,23 +143,27 @@ public enum VSubmenuCommander implements IVSubmenu<CSubmenuCommander> {
FRadioButton tmpHuman = new FRadioButton(); FRadioButton tmpHuman = new FRadioButton();
tmpHuman.setText("Human"); tmpHuman.setText("Human");
tmpHuman.setSelected(i == 0); tmpHuman.setSelected(i == 0);
tempPanel.add(tmpAI);
tempPanel.add(tmpHuman,"wrap"); FPanel typeBtnPanel = new FPanel();
typeBtnPanel.add(tmpAI);
typeBtnPanel.add(tmpHuman,"wrap");
tempBtnGroup.add(tmpAI); tempBtnGroup.add(tmpAI);
tempBtnGroup.add(tmpHuman); tempBtnGroup.add(tmpHuman);
playerIsAIRadios.add(tmpAI); playerIsAIRadios.add(tmpAI);
playerIsAIRadios.add(tmpAI);
tempPanel.add(new FLabel.Builder().text("Select Deck:").build(), "gap 0px 0px 10px 10px, flowy"); tempPanel.add(new FLabel.Builder().text("Select Deck:").build(), "gap 0px 0px 10px 10px, flowy");
tempPanel.add(typeBtnPanel);
JScrollPane scrDecks = new FScrollPane(tempList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); JScrollPane scrDecks = new FScrollPane(tempList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
tempPanel.add(scrDecks, "w 55%!, h 90%, gap 0px 10px 0px 10px, growy, pushy, wrap"); tempPanel.add(scrDecks, "w 55%!, h 90%, gap 0px 10px 0px 10px, growy, pushy, wrap");
playerPanels.add(tempPanel); playerPanels.add(tempPanel);
if (i == 0) {
tabPane.add("Human", tempPanel); tabPane.add("Player " + (i+1), tempPanel);
} else {
tabPane.add("Opponent " + i, tempPanel);
}
} }
pnlStart.setOpaque(false); pnlStart.setOpaque(false);
@@ -179,7 +183,7 @@ public enum VSubmenuCommander implements IVSubmenu<CSubmenuCommander> {
} }
else { else {
for (int i = currentNumTabsShown; i <= toShow; i++) { for (int i = currentNumTabsShown; i <= toShow; i++) {
tabPane.add("Opponent " + i, playerPanels.get(i)); tabPane.add("Player " + i, playerPanels.get(i));
} }
currentNumTabsShown = tabPane.getComponentCount() - 1; currentNumTabsShown = tabPane.getComponentCount() - 1;
} }

View File

@@ -98,7 +98,6 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
FPanel tempPanel; FPanel tempPanel;
FDeckChooser tempChooser; FDeckChooser tempChooser;
FList<Object> tempPlanarDeckList; FList<Object> tempPlanarDeckList;
ButtonGroup tempBtnGroup;
//Settings panel //Settings panel
FPanel settingsPanel = new FPanel(); FPanel settingsPanel = new FPanel();
@@ -131,15 +130,19 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
deckChoosers.add(tempChooser); deckChoosers.add(tempChooser);
tempBtnGroup = new ButtonGroup(); ButtonGroup tempBtnGroup = new ButtonGroup();
FRadioButton tmpAI = new FRadioButton(); FRadioButton tmpAI = new FRadioButton();
tmpAI.setText("AI"); tmpAI.setText("AI");
tmpAI.setSelected(i != 0); tmpAI.setSelected(i != 0);
FRadioButton tmpHuman = new FRadioButton(); FRadioButton tmpHuman = new FRadioButton();
tmpHuman.setText("Human"); tmpHuman.setText("Human");
tmpHuman.setSelected(i == 0); tmpHuman.setSelected(i == 0);
tempPanel.add(tmpAI);
tempPanel.add(tmpHuman,"wrap"); FPanel typeBtnPanel = new FPanel();
typeBtnPanel.add(tmpAI);
typeBtnPanel.add(tmpHuman,"wrap");
tempPanel.add(typeBtnPanel);
tempBtnGroup.add(tmpAI); tempBtnGroup.add(tmpAI);
tempBtnGroup.add(tmpHuman); tempBtnGroup.add(tmpHuman);
playerIsAIRadios.add(tmpAI); playerIsAIRadios.add(tmpAI);
@@ -157,11 +160,8 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
planarDeckLists.add(tempPlanarDeckList); planarDeckLists.add(tempPlanarDeckList);
playerPanels.add(tempPanel); playerPanels.add(tempPanel);
if (i == 0) {
tabPane.add("Human", tempPanel); tabPane.add("Player " + (i+1), tempPanel);
} else {
tabPane.add("Opponent " + i, tempPanel);
}
} }
final String strCheckboxConstraints = "h 30px!, gap 0 20px 0 0"; final String strCheckboxConstraints = "h 30px!, gap 0 20px 0 0";
@@ -185,7 +185,7 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
} }
else { else {
for (int i = currentNumTabsShown; i <= toShow; i++) { for (int i = currentNumTabsShown; i <= toShow; i++) {
tabPane.add("Opponent " + i, playerPanels.get(i)); tabPane.add("Player " + i, playerPanels.get(i));
} }
currentNumTabsShown = tabPane.getComponentCount() - 1; currentNumTabsShown = tabPane.getComponentCount() - 1;
} }

View File

@@ -146,7 +146,6 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
FDeckChooser tempChooser; FDeckChooser tempChooser;
FList<Object> tempList; FList<Object> tempList;
CardDetailPanel tempDetail; CardDetailPanel tempDetail;
ButtonGroup tempBtnGroup;
//Settings panel //Settings panel
FPanel settingsPanel = new FPanel(); FPanel settingsPanel = new FPanel();
@@ -186,15 +185,19 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
deckChoosers.add(tempChooser); deckChoosers.add(tempChooser);
avatarLists.add(tempList); avatarLists.add(tempList);
tempBtnGroup = new ButtonGroup(); ButtonGroup tempBtnGroup = new ButtonGroup();
FRadioButton tmpAI = new FRadioButton(); FRadioButton tmpAI = new FRadioButton();
tmpAI.setText("AI"); tmpAI.setText("AI");
tmpAI.setSelected(i != 0); tmpAI.setSelected(i != 0);
FRadioButton tmpHuman = new FRadioButton(); FRadioButton tmpHuman = new FRadioButton();
tmpHuman.setText("Human"); tmpHuman.setText("Human");
tmpHuman.setSelected(i == 0); tmpHuman.setSelected(i == 0);
tempPanel.add(tmpAI);
tempPanel.add(tmpHuman,"wrap"); FPanel typeBtnPanel = new FPanel();
typeBtnPanel.add(tmpAI);
typeBtnPanel.add(tmpHuman,"wrap");
tempPanel.add(typeBtnPanel);
tempBtnGroup.add(tmpAI); tempBtnGroup.add(tmpAI);
tempBtnGroup.add(tmpHuman); tempBtnGroup.add(tmpHuman);
playerIsAIRadios.add(tmpAI); playerIsAIRadios.add(tmpAI);
@@ -212,11 +215,8 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
tempPanel.add(tempDetail, "span 1 2, gap 0px 10px 10px 10px, growy, pushy, growx, pushx"); tempPanel.add(tempDetail, "span 1 2, gap 0px 10px 10px 10px, growy, pushy, growx, pushx");
playerPanels.add(tempPanel); playerPanels.add(tempPanel);
if (i == 0) {
tabPane.add("Human", tempPanel); tabPane.add("Player " + (i+1), tempPanel);
} else {
tabPane.add("Opponent " + i, tempPanel);
}
} }
final String strCheckboxConstraints = "h 30px!, gap 0 20px 0 0"; final String strCheckboxConstraints = "h 30px!, gap 0 20px 0 0";
@@ -240,7 +240,7 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
} }
else { else {
for (int i = currentNumTabsShown; i <= toShow; i++) { for (int i = currentNumTabsShown; i <= toShow; i++) {
tabPane.add("Opponent " + i, playerPanels.get(i)); tabPane.add("Player " + i, playerPanels.get(i));
} }
currentNumTabsShown = tabPane.getComponentCount() - 1; currentNumTabsShown = tabPane.getComponentCount() - 1;
} }