mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix for broken variants with new android multiplayer code
This commit is contained in:
@@ -815,6 +815,10 @@ public class FDeckChooser extends FScreen {
|
|||||||
/*if(selectedDeckType.equals(DeckType.STANDARD_CARDGEN_DECK)){
|
/*if(selectedDeckType.equals(DeckType.STANDARD_CARDGEN_DECK)){
|
||||||
return DeckgenUtil.buildCardGenDeck(lstDecks.getSelectedItem().getName());
|
return DeckgenUtil.buildCardGenDeck(lstDecks.getSelectedItem().getName());
|
||||||
}*/
|
}*/
|
||||||
|
//ensure a deck is selected first
|
||||||
|
if(lstDecks.getSelectedIndex() == -1){
|
||||||
|
lstDecks.setSelectedIndex(0);
|
||||||
|
}
|
||||||
DeckProxy proxy = lstDecks.getSelectedItem();
|
DeckProxy proxy = lstDecks.getSelectedItem();
|
||||||
if (proxy == null) { return null; }
|
if (proxy == null) { return null; }
|
||||||
return proxy.getDeck();
|
return proxy.getDeck();
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateLayoutForVariants() {
|
void updateLayoutForVariants() {
|
||||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
for (int i = 0; i < cbPlayerCount.getSelectedItem(); i++) {
|
||||||
playerPanels.get(i).updateVariantControlsVisibility();
|
playerPanels.get(i).updateVariantControlsVisibility();
|
||||||
}
|
}
|
||||||
playersScroll.revalidate();
|
playersScroll.revalidate();
|
||||||
@@ -461,12 +461,11 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
@Override
|
@Override
|
||||||
public void update(final boolean fullUpdate) {
|
public void update(final boolean fullUpdate) {
|
||||||
int playerCount = lobby.getNumberOfSlots();
|
int playerCount = lobby.getNumberOfSlots();
|
||||||
//cbPlayerCount.setSelectedItem(playerCount);
|
|
||||||
|
|
||||||
updateVariantSelection();
|
updateVariantSelection();
|
||||||
|
|
||||||
final boolean allowNetworking = lobby.isAllowNetworking();
|
final boolean allowNetworking = lobby.isAllowNetworking();
|
||||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
for (int i = 0; i < cbPlayerCount.getSelectedItem(); i++) {
|
||||||
final boolean hasPanel = i < playerPanels.size();
|
final boolean hasPanel = i < playerPanels.size();
|
||||||
if (i < playerCount) {
|
if (i < playerCount) {
|
||||||
// visible panels
|
// visible panels
|
||||||
|
|||||||
Reference in New Issue
Block a user