mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08: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)){
|
||||
return DeckgenUtil.buildCardGenDeck(lstDecks.getSelectedItem().getName());
|
||||
}*/
|
||||
//ensure a deck is selected first
|
||||
if(lstDecks.getSelectedIndex() == -1){
|
||||
lstDecks.setSelectedIndex(0);
|
||||
}
|
||||
DeckProxy proxy = lstDecks.getSelectedItem();
|
||||
if (proxy == null) { return null; }
|
||||
return proxy.getDeck();
|
||||
|
||||
@@ -223,7 +223,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
||||
}
|
||||
|
||||
void updateLayoutForVariants() {
|
||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
||||
for (int i = 0; i < cbPlayerCount.getSelectedItem(); i++) {
|
||||
playerPanels.get(i).updateVariantControlsVisibility();
|
||||
}
|
||||
playersScroll.revalidate();
|
||||
@@ -461,12 +461,11 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
||||
@Override
|
||||
public void update(final boolean fullUpdate) {
|
||||
int playerCount = lobby.getNumberOfSlots();
|
||||
//cbPlayerCount.setSelectedItem(playerCount);
|
||||
|
||||
updateVariantSelection();
|
||||
|
||||
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();
|
||||
if (i < playerCount) {
|
||||
// visible panels
|
||||
|
||||
Reference in New Issue
Block a user