- Race Finish Dialog showing up, unsure if its actually showing the correct ordering or not.

tags : #story[1245]
This commit is contained in:
Alistair McIntyre
2017-09-14 14:42:25 +12:00
parent bf427f24d3
commit 3a41c27d8d
8 changed files with 322 additions and 223 deletions
@@ -248,14 +248,12 @@ public class ViewManager {
public RaceViewController loadRaceView() {
FXMLLoader loader = loadFxml("/views/RaceView.fxml");
// have to create a new stage and set the race view maximized as JFoenix decorator has
// bug causes stage cannot be fully maximised.
Platform.runLater(() -> {
try {
stage.close();
stage = new Stage();
JFXDecorator decorator = new JFXDecorator(stage, loader.load(), false, true, true);
decorator.setCustomMaximize(true);
decorator.applyCss();
@@ -263,6 +261,8 @@ public class ViewManager {
.add(getClass().getResource("/css/Master.css").toExternalForm());
setDecorator(decorator);
Scene scene = new Scene(decorator);
RaceViewController raceViewController = loader.getController();
gameClient.setRaceViewController(raceViewController);
// set key press event to catch key stoke
scene.setOnKeyPressed(gameClient::keyPressed);
scene.setOnKeyReleased(gameClient::keyReleased);