mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
[Mobile] Fix portrait layout for variant selection
This commit is contained in:
@@ -272,6 +272,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
float x = PADDING;
|
float x = PADDING;
|
||||||
float y = startY + PADDING;
|
float y = startY + PADDING;
|
||||||
float fieldHeight = cbPlayerCount.getHeight();
|
float fieldHeight = cbPlayerCount.getHeight();
|
||||||
|
if (Forge.isLandscapeMode()) {
|
||||||
lblVariants.setBounds(x, y, lblVariants.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
lblVariants.setBounds(x, y, lblVariants.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
x += lblVariants.getWidth();
|
x += lblVariants.getWidth();
|
||||||
cbVariants.setBounds(x, y, width - (x + lblGamesInMatch.getAutoSizeBounds().width + PADDING/2
|
cbVariants.setBounds(x, y, width - (x + lblGamesInMatch.getAutoSizeBounds().width + PADDING/2
|
||||||
@@ -284,6 +285,20 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
lblGamesInMatch.setBounds(x, y, lblGamesInMatch.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
lblGamesInMatch.setBounds(x, y, lblGamesInMatch.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
x += lblGamesInMatch.getWidth();
|
x += lblGamesInMatch.getWidth();
|
||||||
cbGamesInMatch.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
cbGamesInMatch.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
||||||
|
} else {
|
||||||
|
lblVariants.setBounds(x, y, lblVariants.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
|
x += lblVariants.getWidth();
|
||||||
|
cbVariants.setBounds(x, y, width - x - PADDING, fieldHeight);
|
||||||
|
x = PADDING;
|
||||||
|
y += cbVariants.getHeight() + PADDING;
|
||||||
|
lblPlayers.setBounds(x, y, lblPlayers.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
|
x += lblPlayers.getWidth();
|
||||||
|
cbPlayerCount.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
||||||
|
x += cbPlayerCount.getWidth() + PADDING;
|
||||||
|
lblGamesInMatch.setBounds(x, y, lblGamesInMatch.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
|
x += lblGamesInMatch.getWidth();
|
||||||
|
cbGamesInMatch.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
||||||
|
}
|
||||||
y += cbPlayerCount.getHeight() + PADDING;
|
y += cbPlayerCount.getHeight() + PADDING;
|
||||||
playersScroll.setBounds(0, y, width, height - y);
|
playersScroll.setBounds(0, y, width, height - y);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user