Commit 3d577f0e authored by Anders H. Rebner's avatar Anders H. Rebner
Browse files

Fixed lobbyview only showing lobby creator

parent fe0bf895
......@@ -581,8 +581,8 @@ public class LobbyView extends View{
for(int i = 0; i<lobby.getPlayers().size(); i++){
Player player = lobby.getPlayers().get(i);
System.out.println("Finding avatar with index: " + player.getIndexAvatar());
System.out.println("Name is: " + availableAvatarsHashMap.get(player.getIndexAvatar()));
//System.out.println("Finding avatar with index: " + player.getIndexAvatar());
//System.out.println("Name is: " + availableAvatarsHashMap.get(player.getIndexAvatar()));
String path = Enum.valueOf(CharacterAssets.class, availableAvatarsHashMap.get(player.getIndexAvatar())+"Atlas").path;
Class classType = Enum.valueOf(CharacterAssets.class, availableAvatarsHashMap.get(player.getIndexAvatar())+"Atlas").classType;
......@@ -598,16 +598,17 @@ public class LobbyView extends View{
int remX = i%4;
int remY = mod(2, i+2);
int xPad = 10;
System.out.printf("remX: %d\tremY: %d\n", remX, remY);
//System.out.printf("remX: %d\tremY: %d\n", remX, remY);
animatedSprite.setPosition(lobbyImage.getX()-xPad+remX*((lobbyImage.getWidth()-xPad)/4), lobbyImage.getY()-remY*(lobbyImage.getHeight()/7.5f));
animatedSprite.setScale(0.3f+0.025f*remY, 0.3f+0.025f*remY);
lobbyAvatars.add(animatedSprite);
Label label = new Label("Player"+i+":\t%d" + player.getPlayerName() + "\t", skin, "black");
Label label = new Label("Player"+i+":\t" + player.getPlayerName() + "\t", skin, "black");
label.setColor(Color.BLACK);
label.scaleBy(2f);
label.setPosition(lobbyListBubbleImage.getX()+xpad, lobbyListBubbleImage.getY()+lobbyListBubbleImage.getHeight()*(0.9f-label.getHeight()*i-i*0.05f));
label.setPosition(lobbyListBubbleImage.getX()+xpad, lobbyListBubbleImage.getY()+lobbyListBubbleImage.getHeight() - (i + 1) * (label.getHeight() * 2.5F)); //(0.9f-label.getHeight()*i-i*0.05f));
stage.addActor(label);
lobbyLabels.add(label);
if(player.getIsPlayerReady()) {
......@@ -618,7 +619,6 @@ public class LobbyView extends View{
else{
System.out.println("Player is not ready..");
}
stage.addActor(lobbyLabels.get(i));
}
for (Image image : playerReadyImages){
stage.addActor(image);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment