Merge
This commit is contained in:
commit
d51c97c989
@ -29,8 +29,9 @@ public class HappyBirdMain extends Application {
|
|||||||
private Label acronymLabel = new Label("KÜRZEL");
|
private Label acronymLabel = new Label("KÜRZEL");
|
||||||
private Label headline = new Label("HAPPY BIRD");
|
private Label headline = new Label("HAPPY BIRD");
|
||||||
private Label soundLabel = new Label("SOUND");
|
private Label soundLabel = new Label("SOUND");
|
||||||
|
private Label currentScoreLabel = new Label("SCORE");
|
||||||
private Label labels[] = {nameLabel, acronymLabel, soundLabel};
|
private Label highscoreLabel = new Label("HIGHSCORE");
|
||||||
|
private Label labels[] = {nameLabel, acronymLabel, soundLabel, currentScoreLabel, highscoreLabel};
|
||||||
private Label headlineLabels[] = {headline};
|
private Label headlineLabels[] = {headline};
|
||||||
|
|
||||||
private Button startButton = new Button("START");
|
private Button startButton = new Button("START");
|
||||||
@ -295,26 +296,26 @@ public class HappyBirdMain extends Application {
|
|||||||
startGameButton.setOnAction(event -> {
|
startGameButton.setOnAction(event -> {
|
||||||
startGameButtonClick();
|
startGameButtonClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
for(Button button : buttons) {
|
for(Button button : buttons) {
|
||||||
button.setVisible(false);
|
button.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
startGameButton.setVisible(true);
|
startGameButton.setVisible(true);
|
||||||
menuButton.setVisible(true);
|
menuButton.setVisible(true);
|
||||||
startGameButton.setLayoutY(520);
|
startGameButton.setLayoutY(520);
|
||||||
|
|
||||||
for(TextField feld : inputFields) {
|
for(TextField feld : inputFields) {
|
||||||
feld.setVisible(true);
|
feld.setVisible(true);
|
||||||
}
|
}
|
||||||
for (Label label : labels ) {
|
for (Label label : labels ) {
|
||||||
label.setVisible(true);
|
label.setVisible(true);
|
||||||
}
|
}
|
||||||
|
highscoreLabel.setVisible(false);
|
||||||
|
currentScoreLabel.setVisible(false);
|
||||||
soundLabel.setVisible(false);
|
soundLabel.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Hauptmenü wird ausgeblendet, Einstellungen folgen
|
* Hauptmenü wird ausgeblendet, Einstellungen folgen
|
||||||
*/
|
*/
|
||||||
@ -366,6 +367,7 @@ public class HappyBirdMain extends Application {
|
|||||||
* Startet Spiel nach Namenseingabe
|
* Startet Spiel nach Namenseingabe
|
||||||
*/
|
*/
|
||||||
public void startGameButtonClick() {
|
public void startGameButtonClick() {
|
||||||
|
nameLabel.setText("NAME: " + acronym.getText());
|
||||||
for(TextField feld : inputFields) {
|
for(TextField feld : inputFields) {
|
||||||
feld.setVisible(false);
|
feld.setVisible(false);
|
||||||
}
|
}
|
||||||
@ -380,6 +382,9 @@ public class HappyBirdMain extends Application {
|
|||||||
pane.getChildren().add(birdView);
|
pane.getChildren().add(birdView);
|
||||||
birdView.setLayoutY(325);
|
birdView.setLayoutY(325);
|
||||||
birdView.setLayoutX(50);
|
birdView.setLayoutX(50);
|
||||||
|
nameLabel.setLayoutX(10);
|
||||||
|
nameLabel.setLayoutY(10);
|
||||||
|
nameLabel.setVisible(true);
|
||||||
|
|
||||||
ImageView upperPipeView = new ImageView(upperPipe);
|
ImageView upperPipeView = new ImageView(upperPipe);
|
||||||
pane.getChildren().add(upperPipeView);
|
pane.getChildren().add(upperPipeView);
|
||||||
@ -390,5 +395,12 @@ public class HappyBirdMain extends Application {
|
|||||||
pane.getChildren().add(lowerPipeView);
|
pane.getChildren().add(lowerPipeView);
|
||||||
lowerPipeView.setLayoutX(400);
|
lowerPipeView.setLayoutX(400);
|
||||||
lowerPipeView.setLayoutY(430);
|
lowerPipeView.setLayoutY(430);
|
||||||
|
|
||||||
|
currentScoreLabel.setLayoutX(540);
|
||||||
|
currentScoreLabel.setLayoutY(10);
|
||||||
|
currentScoreLabel.setVisible(true);
|
||||||
|
highscoreLabel.setLayoutX(540);
|
||||||
|
highscoreLabel.setLayoutY(70);
|
||||||
|
highscoreLabel.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user