mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Merge branch 'master' into historicformats
This commit is contained in:
@@ -494,8 +494,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
panel = new PlayerPanel(this, allowNetworking, i, slot, lobby.mayEdit(i), lobby.hasControl());
|
panel = new PlayerPanel(this, allowNetworking, i, slot, lobby.mayEdit(i), lobby.hasControl());
|
||||||
if (i == 2) {
|
if (i == 2) {
|
||||||
panel.initialize(FPref.CONSTRUCTED_P3_DECK_STATE, FPref.COMMANDER_P3_DECK_STATE, FPref.TINY_LEADER_P3_DECK_STATE, FPref.BRAWL_P3_DECK_STATE, DeckType.COLOR_DECK);
|
panel.initialize(FPref.CONSTRUCTED_P3_DECK_STATE, FPref.COMMANDER_P3_DECK_STATE, FPref.TINY_LEADER_P3_DECK_STATE, FPref.BRAWL_P3_DECK_STATE, DeckType.COLOR_DECK);
|
||||||
}
|
} else if (i == 3) {
|
||||||
if(i==3) {
|
|
||||||
panel.initialize(FPref.CONSTRUCTED_P4_DECK_STATE, FPref.COMMANDER_P4_DECK_STATE, FPref.TINY_LEADER_P4_DECK_STATE, FPref.BRAWL_P4_DECK_STATE, DeckType.COLOR_DECK);
|
panel.initialize(FPref.CONSTRUCTED_P4_DECK_STATE, FPref.COMMANDER_P4_DECK_STATE, FPref.TINY_LEADER_P4_DECK_STATE, FPref.BRAWL_P4_DECK_STATE, DeckType.COLOR_DECK);
|
||||||
}
|
}
|
||||||
playerPanels.add(panel);
|
playerPanels.add(panel);
|
||||||
|
|||||||
@@ -544,7 +544,14 @@ public class MatchScreen extends FScreen {
|
|||||||
}
|
}
|
||||||
float playerCount = getPlayerPanels().keySet().size();
|
float playerCount = getPlayerPanels().keySet().size();
|
||||||
|
|
||||||
//determine player panel heights based on visibility of zone displays
|
if (Forge.isLandscapeMode() && playerCount == 2) {
|
||||||
|
// Ensure that players have equal player panel heights in two player Forge in Landscape mode
|
||||||
|
float topPlayerPanelHeight = totalHeight / 2;
|
||||||
|
float bottomPlayerPanelHeight = topPlayerPanelHeight;
|
||||||
|
topPlayerPanel.setBounds(0, 0, visibleWidth, topPlayerPanelHeight);
|
||||||
|
bottomPlayerPanel.setBounds(0, totalHeight - bottomPlayerPanelHeight, visibleWidth, bottomPlayerPanelHeight);
|
||||||
|
} else {
|
||||||
|
// Determine player panel heights based on visibility of zone displays
|
||||||
float cardRowsHeight = totalHeight - playerCount * avatarHeight;
|
float cardRowsHeight = totalHeight - playerCount * avatarHeight;
|
||||||
float totalCardRows = 0;
|
float totalCardRows = 0;
|
||||||
for (VPlayerPanel playerPanel : playerPanelsList) {
|
for (VPlayerPanel playerPanel : playerPanelsList) {
|
||||||
@@ -565,6 +572,8 @@ public class MatchScreen extends FScreen {
|
|||||||
playerPanel.setBounds(0, y, visibleWidth, panelHeight);
|
playerPanel.setBounds(0, y, visibleWidth, panelHeight);
|
||||||
y += panelHeight;
|
y += panelHeight;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new ScrollBounds(visibleWidth, totalHeight);
|
return new ScrollBounds(visibleWidth, totalHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user