few changes to finished screen
parent
a8e96c3306
commit
abc6668bff
|
@ -351,11 +351,14 @@ public class LaticeApplicationWindow extends Application {
|
||||||
|
|
||||||
private void switchToGameFinishedScreen() throws IOException {
|
private void switchToGameFinishedScreen() throws IOException {
|
||||||
System.out.println("confirmBtnClickedCount : " + confirmBtnClickedCount);
|
System.out.println("confirmBtnClickedCount : " + confirmBtnClickedCount);
|
||||||
if (confirmBtnClickedCount>=2) {
|
if (confirmBtnClickedCount>=20) {
|
||||||
Parent loader = FXMLLoader.load(getClass().getResource("../view/GameFinishedScreen.fxml"));
|
Parent loader = FXMLLoader.load(getClass().getResource("../view/GameFinishedScreen.fxml"));
|
||||||
Scene gameFinishedScreenScene = new Scene(loader, 1280, 720);
|
Scene gameFinishedScreenScene = new Scene(loader, 1280, 720);
|
||||||
System.out.println("lancement :::::" + stage);
|
if (confirmBtnClickedCount%2 == 0) {
|
||||||
//TODO saisir le nom du gagnant : GameFinishedScreenController.nameWinner.setText();
|
GameFinishedScreenController.nameWinner.setText(player1.getName());
|
||||||
|
}else {
|
||||||
|
GameFinishedScreenController.nameWinner.setText(player2.getName());
|
||||||
|
}
|
||||||
stage.setScene(gameFinishedScreenScene);
|
stage.setScene(gameFinishedScreenScene);
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class GameFinishedScreenController {
|
||||||
@FXML
|
@FXML
|
||||||
private Button quitBtn;
|
private Button quitBtn;
|
||||||
@FXML
|
@FXML
|
||||||
public static Label nameWinner;
|
public static Label nameWinner = new Label();
|
||||||
|
|
||||||
// Event Listener on Button[#replayBtn].onMouseClicked
|
// Event Listener on Button[#replayBtn].onMouseClicked
|
||||||
@FXML
|
@FXML
|
||||||
|
|
Loading…
Reference in New Issue