|
|
|
@ -144,7 +144,7 @@ public class RaceController extends Controller {
|
|
|
|
if (result.get() == ButtonType.OK) {
|
|
|
|
if (result.get() == ButtonType.OK) {
|
|
|
|
parent.endEvent();
|
|
|
|
parent.endEvent();
|
|
|
|
race.setVisible(false);
|
|
|
|
race.setVisible(false);
|
|
|
|
App.app.loadStart(App.getStage());
|
|
|
|
App.app.showMainStage(App.getStage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
|
|
|
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
|
|
|
@ -153,11 +153,13 @@ public class RaceController extends Controller {
|
|
|
|
Optional<ButtonType> result = alert.showAndWait();
|
|
|
|
Optional<ButtonType> result = alert.showAndWait();
|
|
|
|
if (result.get() == ButtonType.OK) {
|
|
|
|
if (result.get() == ButtonType.OK) {
|
|
|
|
race.setVisible(false);
|
|
|
|
race.setVisible(false);
|
|
|
|
App.app.loadStart(App.getStage());
|
|
|
|
App.app.showMainStage(App.getStage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -469,9 +471,11 @@ public class RaceController extends Controller {
|
|
|
|
race.setVisible(false);
|
|
|
|
race.setVisible(false);
|
|
|
|
//parent.enterTitle();
|
|
|
|
//parent.enterTitle();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
App.app.loadStart(App.getStage());
|
|
|
|
App.app.showMainStage(App.getStage());
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//TODO currently this doesn't work correctly - the title screen remains visible after clicking join game
|
|
|
|
//TODO currently this doesn't work correctly - the title screen remains visible after clicking join game
|
|
|
|
//TODO we should display an error to the user
|
|
|
|
//TODO we should display an error to the user
|
|
|
|
|