From 68c4b49d8b2f2455dc44e4d1e7da4f056094fdfb Mon Sep 17 00:00:00 2001 From: drdev Date: Fri, 23 May 2014 19:59:54 +0000 Subject: [PATCH] Reverse order of players on drop down --- .../src/forge/screens/match/views/VPlayers.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/forge-gui-mobile/src/forge/screens/match/views/VPlayers.java b/forge-gui-mobile/src/forge/screens/match/views/VPlayers.java index 6b68e6bba2a..dd8a0538253 100644 --- a/forge-gui-mobile/src/forge/screens/match/views/VPlayers.java +++ b/forge-gui-mobile/src/forge/screens/match/views/VPlayers.java @@ -36,12 +36,14 @@ public class VPlayers extends FDropDown { @Override protected ScrollBounds updateAndGetPaneSize(float maxWidth, float maxVisibleHeight) { - float y = 0; + float totalHeight = getChildCount() * PlayerInfoPanel.HEIGHT; + float y = totalHeight - PlayerInfoPanel.HEIGHT; + //display in reverse order so gui player on bottom for (FDisplayObject panel : getChildren()) { panel.setBounds(0, y, maxWidth, PlayerInfoPanel.HEIGHT); - y += PlayerInfoPanel.HEIGHT; + y -= PlayerInfoPanel.HEIGHT; } - return new ScrollBounds(maxWidth, y); + return new ScrollBounds(maxWidth, totalHeight); } private static class PlayerInfoPanel extends FContainer {