- Created a Race Finish Dialog.

tags : #story[1245]
This commit is contained in:
Alistair McIntyre
2017-09-14 13:34:48 +12:00
parent 7d0a47446d
commit bf427f24d3
2 changed files with 29 additions and 23 deletions
@@ -76,17 +76,6 @@ public class GameClient {
*/
public GameClient(Pane holder) {
this.holderPane = holder;
// if (holderPane.getParent() == null) {
// this.holderPane.parentProperty().addListener(((observable, oldValue, newValue) -> {
// if (newValue != null) {
// newValue.getScene().setOnKeyPressed(this::keyPressed);
// newValue.getScene().setOnKeyReleased(this::keyReleased);
// }
// }));
// } else {
// this.holderPane.getParent().getScene().setOnKeyPressed(this::keyPressed);
// this.holderPane.getParent().getScene().setOnKeyReleased(this::keyReleased);
// }
}
/**
@@ -117,22 +106,10 @@ public class GameClient {
ViewManager.getInstance().setProperty("serverName", regattaData.getRegattaName());
ViewManager.getInstance().setProperty("mapName", regattaData.getCourseName());
// TODO disable ready button;
//LobbyController_old lobbyController = loadLobby();
//lobbyController.setSocketThread(socketThread);
//lobbyController.setPlayerID(socketThread.getClientId());
//lobbyController.setPlayerListSource(clientLobbyList);
//lobbyController.disableReadyButton();
// lobbyController.addCloseListener((exitCause) -> this.loadStartScreen());
this.lobbyController = ViewManager.getInstance().goToLobby(true);
} catch (IOException ioe) {
showConnectionError("Unable to find server");
//Platform.runLater(this::loadStartScreen);
}
}
@@ -214,6 +191,7 @@ public class GameClient {
Sounds.stopMusic();
Sounds.stopSoundEffects();
Sounds.playFinishMusic();
System.out.println("ITS WORKING HERE");
FXMLLoader fxmlLoader = loadFXMLToHolder("/views/FinishScreenView.fxml");
FinishScreenViewController controller = fxmlLoader.getController();
controller.setFinishers(raceState.getPlayerPositions());