mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
[Mobile] Update LobbyScreen
-switch places of variants and players combo boxes for landscape layout
This commit is contained in:
@@ -252,6 +252,15 @@ 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);
|
||||||
|
x += lblVariants.getWidth();
|
||||||
|
cbVariants.setBounds(x, y, width - (x + lblPlayers.getAutoSizeBounds().width + PADDING/2 + Utils.AVG_FINGER_WIDTH + PADDING), fieldHeight);
|
||||||
|
x += cbVariants.getWidth();
|
||||||
|
lblPlayers.setBounds(x, y, lblPlayers.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
|
x += lblPlayers.getWidth();
|
||||||
|
cbPlayerCount.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
||||||
|
} else {
|
||||||
lblPlayers.setBounds(x, y, lblPlayers.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
lblPlayers.setBounds(x, y, lblPlayers.getAutoSizeBounds().width + PADDING / 2, fieldHeight);
|
||||||
x += lblPlayers.getWidth();
|
x += lblPlayers.getWidth();
|
||||||
cbPlayerCount.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
cbPlayerCount.setBounds(x, y, Utils.AVG_FINGER_WIDTH, fieldHeight);
|
||||||
@@ -259,7 +268,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
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 - PADDING, fieldHeight);
|
cbVariants.setBounds(x, y, width - x - PADDING, 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