Updated lobby controller to pass the player ID through, and the lobby view to have a customize button.

tags: #story[1142]
This commit is contained in:
Alistair McIntyre
2017-08-15 16:48:23 +12:00
parent 1f09005147
commit 9cb5956f3c
3 changed files with 22 additions and 4 deletions
@@ -72,7 +72,6 @@ public class GameClient {
socketThread.addStreamObserver(this::parsePackets);
LobbyController lobbyController = loadLobby();
lobbyController.setPlayerListSource(clientLobbyList);
lobbyController.disableReadyButton();
lobbyController.setTitle("Connected to host - IP : " + ipAddress + " Port : " + portNumber);
lobbyController.addCloseListener((exitCause) -> this.loadStartScreen());
@@ -93,7 +92,6 @@ public class GameClient {
}
socketThread.addStreamObserver(this::parsePackets);
LobbyController lobbyController = loadLobby();
lobbyController.setPlayerListSource(clientLobbyList);
lobbyController.setTitle("Hosting Lobby - IP : " + ipAddress + " Port : " + portNumber);
lobbyController.addCloseListener(exitCause -> {
if (exitCause == CloseStatus.READY) {
@@ -133,7 +131,11 @@ public class GameClient {
} catch (IOException e) {
e.printStackTrace();
}
return fxmlLoader.getController();
LobbyController lobbyController = fxmlLoader.getController();
lobbyController.setPlayerListSource(clientLobbyList);
lobbyController.setPlayerID(socketThread.getClientId());
return lobbyController;
}
private void loadRaceView() {