Fix für den Restart-Button - mehrere Neustarts ergeben keine Fehler
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -176,7 +176,7 @@ public class FormatingClass {
|
||||
"-fx-alignment: center;");
|
||||
|
||||
currentScoreEndscreenLabel.setPrefSize(300,50);
|
||||
currentScoreEndscreenLabel.setLayoutX(75);
|
||||
currentScoreEndscreenLabel.setLayoutX(50);
|
||||
currentScoreEndscreenLabel.setLayoutY(100);
|
||||
currentScoreEndscreenLabel.setStyle("-fx-background-color: #DED894; " +
|
||||
"-fx-text-fill: #000000; " +
|
||||
|
@@ -1042,7 +1042,12 @@ public class HappyBirdMain extends Application {
|
||||
for (Rectangle pipe : pipesArrayList) {
|
||||
pane.getChildren().remove(pipe);
|
||||
}
|
||||
pipesArrayList.clear();
|
||||
collectedPoints = 0;
|
||||
currentScoreLabel.setText("SCORE: " + collectedPoints);
|
||||
endScreenOpened = false;
|
||||
openEndScreen = false;
|
||||
endScreen.getChildren().clear();
|
||||
startGameButtonClick();
|
||||
}
|
||||
|
||||
@@ -1057,6 +1062,7 @@ public class HappyBirdMain extends Application {
|
||||
button.setVisible(false);
|
||||
}
|
||||
/* Back-Button einblenden */
|
||||
backEndscreenButton.setLayoutY(425);
|
||||
backEndscreenButton.setVisible(true);
|
||||
|
||||
/* Überschrift ändern */
|
||||
@@ -1067,7 +1073,7 @@ public class HappyBirdMain extends Application {
|
||||
|
||||
/* Highscore-Label (Hintergrund) formatieren und einfügen */
|
||||
highscoreMenuLabel.setLayoutX(75);
|
||||
highscoreMenuLabel.setLayoutY(150);
|
||||
highscoreMenuLabel.setLayoutY(100);
|
||||
highscoreMenuLabel.setPrefSize(250, 300);
|
||||
endScreen.getChildren().add(highscoreMenuLabel);
|
||||
highscoreMenuLabel.setVisible(true);
|
||||
|
Reference in New Issue
Block a user