Compare commits
2 Commits
c828169573
...
95f72fe4e8
Author | SHA1 | Date | |
---|---|---|---|
95f72fe4e8 | |||
337285ea29 |
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.
@ -69,9 +69,9 @@ public class HappyBirdMain extends Application {
|
|||||||
Button startButton = new Button("START");
|
Button startButton = new Button("START");
|
||||||
Button highscoresButton = new Button("HIGHSCORES");
|
Button highscoresButton = new Button("HIGHSCORES");
|
||||||
Button settingsButton = new Button("EINSTELLUNGEN");
|
Button settingsButton = new Button("EINSTELLUNGEN");
|
||||||
Button spielStarten = new Button("SPIEL STARTEN");
|
Button startGame = new Button("SPIEL STARTEN");
|
||||||
|
|
||||||
Button buttons[] = {startButton, highscoresButton, settingsButton, spielStarten};
|
Button buttons[] = {startButton, highscoresButton, settingsButton, startGame};
|
||||||
Button menuButton = new Button("ZURÜCK");
|
Button menuButton = new Button("ZURÜCK");
|
||||||
menuButton.setStyle("-fx-background-color: #e86000; " +
|
menuButton.setStyle("-fx-background-color: #e86000; " +
|
||||||
"-fx-text-fill: #FFFFFF; " +
|
"-fx-text-fill: #FFFFFF; " +
|
||||||
@ -86,8 +86,12 @@ public class HappyBirdMain extends Application {
|
|||||||
menuButton.setLayoutX(575);
|
menuButton.setLayoutX(575);
|
||||||
menuButton.setLayoutY(625);
|
menuButton.setLayoutY(625);
|
||||||
menuButton.setVisible(false);
|
menuButton.setVisible(false);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
startGame.setVisible(false);
|
||||||
|
=======
|
||||||
|
|
||||||
//Button buttons[] = {startButton, highscoresButton, settingsButton};
|
//Button buttons[] = {startButton, highscoresButton, settingsButton};
|
||||||
|
>>>>>>> c82816957310f4cb126c980ad371abcdaba0d6de
|
||||||
|
|
||||||
int yPosition = 225;
|
int yPosition = 225;
|
||||||
for (Button button : buttons) {
|
for (Button button : buttons) {
|
||||||
@ -107,65 +111,88 @@ public class HappyBirdMain extends Application {
|
|||||||
"-fx-background-radius: 20px;");
|
"-fx-background-radius: 20px;");
|
||||||
}
|
}
|
||||||
|
|
||||||
spielStarten.setVisible(false);
|
startGame.setVisible(false);
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
Label nameLabel = new Label("Name:");
|
||||||
|
Label acronymLabel = new Label("Kürzel:");
|
||||||
|
|
||||||
|
Label startLabels[] = {nameLabel, acronymLabel};
|
||||||
|
=======
|
||||||
startButton.setOnAction(event -> {
|
startButton.setOnAction(event -> {
|
||||||
headline.setText("Start");
|
headline.setText("Start");
|
||||||
for(Button button : buttons) {
|
for(Button button : buttons) {
|
||||||
button.setVisible(false);
|
button.setVisible(false);
|
||||||
menuButton.setVisible(true);
|
menuButton.setVisible(true);
|
||||||
}
|
}
|
||||||
|
>>>>>>> c82816957310f4cb126c980ad371abcdaba0d6de
|
||||||
|
|
||||||
Label nameLabel = new Label("Name:");
|
int yPositionStartLabels = 225;
|
||||||
Label acronymLabel = new Label("Kürzel:");
|
for(Label label : startLabels) {
|
||||||
|
label.setPrefSize(250, 50);
|
||||||
|
label.setStyle("-fx-background-color: #DED894; " +
|
||||||
|
"-fx-text-fill: #000000; " +
|
||||||
|
"-fx-font-size: 20px; " +
|
||||||
|
"-fx-border-width: 5px;" +
|
||||||
|
"-fx-border-color: #543847;" +
|
||||||
|
"-fx-font-weight: bold;" +
|
||||||
|
"-fx-alignment: center;" +
|
||||||
|
"-fx-background-radius: 20px;" +
|
||||||
|
"-fx-border-radius: 15px;");
|
||||||
|
|
||||||
Label startLabels[] = {nameLabel, acronymLabel};
|
label.setLayoutX(275);
|
||||||
|
label.setLayoutY(yPositionStartLabels);
|
||||||
|
yPositionStartLabels += 150;
|
||||||
|
|
||||||
int yPositionStartLabels = 225;
|
pane.getChildren().add(label);
|
||||||
for(Label label : startLabels) {
|
label.setVisible(false);
|
||||||
label.setPrefSize(250, 50);
|
}
|
||||||
label.setStyle("-fx-background-color: #DED894; " +
|
|
||||||
"-fx-text-fill: #000000; " +
|
|
||||||
"-fx-font-size: 20px; " +
|
|
||||||
"-fx-border-width: 5px;" +
|
|
||||||
"-fx-border-color: #543847;" +
|
|
||||||
"-fx-font-weight: bold;" +
|
|
||||||
"-fx-alignment: center;" +
|
|
||||||
"-fx-background-radius: 20px;" +
|
|
||||||
"-fx-border-radius: 15px;");
|
|
||||||
|
|
||||||
label.setLayoutX(275);
|
TextField name = new TextField();
|
||||||
label.setLayoutY(yPositionStartLabels);
|
TextField acronym = new TextField();
|
||||||
yPositionStartLabels += 150;
|
|
||||||
|
TextField inputFields[] = {name, acronym};
|
||||||
|
|
||||||
|
int yPositionInputFields = 290;
|
||||||
|
for(TextField feld : inputFields) {
|
||||||
|
feld.setPrefSize(250, 50);
|
||||||
|
feld.setStyle("-fx-font-size: 20px;" +
|
||||||
|
"-fx-font-weight: bold;");
|
||||||
|
|
||||||
|
feld.setLayoutX(275);
|
||||||
|
feld.setLayoutY(yPositionInputFields);
|
||||||
|
yPositionInputFields += 150;
|
||||||
|
|
||||||
|
pane.getChildren().add(feld);
|
||||||
|
feld.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
startButton.setOnAction(event -> {
|
||||||
|
headline.setText("Start");
|
||||||
|
for(Button button : buttons) {
|
||||||
|
button.setVisible(false);
|
||||||
|
|
||||||
pane.getChildren().add(label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField name = new TextField();
|
startGame.setVisible(true);
|
||||||
TextField acronym = new TextField();
|
menuButton.setVisible(true);
|
||||||
|
startGame.setLayoutY(520);
|
||||||
|
|
||||||
TextField inputFields[] = {name, acronym};
|
|
||||||
|
|
||||||
int yPositionInputFields = 290;
|
|
||||||
for(TextField feld : inputFields) {
|
for(TextField feld : inputFields) {
|
||||||
feld.setPrefSize(250, 50);
|
feld.setVisible(true);
|
||||||
feld.setStyle("-fx-font-size: 20px;" +
|
}
|
||||||
"-fx-font-weight: bold;");
|
for (Label label : startLabels )
|
||||||
|
{
|
||||||
feld.setLayoutX(275);
|
label.setVisible(true);
|
||||||
feld.setLayoutY(yPositionInputFields);
|
|
||||||
yPositionInputFields += 150;
|
|
||||||
|
|
||||||
pane.getChildren().add(feld);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spielStarten.setVisible(true);
|
|
||||||
|
|
||||||
spielStarten.setLayoutY(520);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
startGame.setOnAction(event -> {});
|
||||||
|
=======
|
||||||
//startButton.setOnAction(event -> {});
|
//startButton.setOnAction(event -> {});
|
||||||
|
>>>>>>> c82816957310f4cb126c980ad371abcdaba0d6de
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -221,6 +248,14 @@ public class HappyBirdMain extends Application {
|
|||||||
menuButton.setVisible(false);
|
menuButton.setVisible(false);
|
||||||
soundSlider.setVisible(false);
|
soundSlider.setVisible(false);
|
||||||
soundLabel.setVisible(false);
|
soundLabel.setVisible(false);
|
||||||
|
startGame.setVisible(false);
|
||||||
|
for(TextField feld : inputFields) {
|
||||||
|
feld.setVisible(false);
|
||||||
|
}
|
||||||
|
for (Label label : startLabels )
|
||||||
|
{
|
||||||
|
label.setVisible(false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
stage.show();
|
stage.show();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user