diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin index 8795319..98fece4 100644 Binary files a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin and b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin differ diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock index 6fadce2..c2df6c5 100644 Binary files a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock and b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock differ diff --git a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin index f22deff..e5cc545 100644 Binary files a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin and b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin differ diff --git a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock index ef52c21..b094980 100644 Binary files a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock and b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock differ diff --git a/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock index e978ff6..ef9f0a7 100644 Binary files a/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class b/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class index 78c4398..126434b 100644 Binary files a/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class and b/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class differ diff --git a/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar b/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar index 34e1eb0..af292ae 100644 Binary files a/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar and b/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar differ diff --git a/Happy_Bird/build/resources/main/com/example/happy_bird/happyBird.fxml b/Happy_Bird/build/resources/main/com/example/happy_bird/happyBird.fxml index f6f412e..2301392 100644 --- a/Happy_Bird/build/resources/main/com/example/happy_bird/happyBird.fxml +++ b/Happy_Bird/build/resources/main/com/example/happy_bird/happyBird.fxml @@ -7,4 +7,13 @@ +<<<<<<< HEAD +======= + + + + + + +>>>>>>> 5db5b6bb195a2b7d1296e7d3f9b98d6c75dba2c2 diff --git a/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin index 64c74e5..e61e91a 100644 Binary files a/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin and b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java b/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java index 66a4f09..035f72b 100644 --- a/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java +++ b/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java @@ -69,9 +69,9 @@ public class HappyBirdMain extends Application { Button startButton = new Button("START"); Button highscoresButton = new Button("HIGHSCORES"); 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"); menuButton.setStyle("-fx-background-color: #e86000; " + "-fx-text-fill: #FFFFFF; " + @@ -86,8 +86,7 @@ public class HappyBirdMain extends Application { menuButton.setLayoutX(575); menuButton.setLayoutY(625); menuButton.setVisible(false); - - Button buttons[] = {startButton, highscoresButton, settingsButton}; + startGame.setVisible(false); int yPosition = 225; for (Button button : buttons) { @@ -107,7 +106,52 @@ public class HappyBirdMain extends Application { "-fx-background-radius: 20px;"); } - spielStarten.setVisible(false); + startGame.setVisible(false); + + Label nameLabel = new Label("Name:"); + Label acronymLabel = new Label("Kürzel:"); + + Label startLabels[] = {nameLabel, acronymLabel}; + + int yPositionStartLabels = 225; + 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.setLayoutX(275); + label.setLayoutY(yPositionStartLabels); + yPositionStartLabels += 150; + + pane.getChildren().add(label); + label.setVisible(false); + } + + TextField name = new TextField(); + TextField acronym = new TextField(); + + 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"); @@ -116,56 +160,21 @@ public class HappyBirdMain extends Application { } - Label nameLabel = new Label("Name:"); - Label acronymLabel = new Label("Kürzel:"); + startGame.setVisible(true); + menuButton.setVisible(true); + startGame.setLayoutY(520); - Label startLabels[] = {nameLabel, acronymLabel}; - - int yPositionStartLabels = 225; - 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.setLayoutX(275); - label.setLayoutY(yPositionStartLabels); - yPositionStartLabels += 150; - - pane.getChildren().add(label); - } - - TextField name = new TextField(); - TextField acronym = new TextField(); - - 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(true); + } + for (Label label : startLabels ) + { + label.setVisible(true); } - - spielStarten.setVisible(true); - - spielStarten.setLayoutY(520); }); - startButton.setOnAction(event -> {}); + startGame.setOnAction(event -> {}); @@ -221,6 +230,14 @@ public class HappyBirdMain extends Application { menuButton.setVisible(false); soundSlider.setVisible(false); soundLabel.setVisible(false); + startGame.setVisible(false); + for(TextField feld : inputFields) { + feld.setVisible(false); + } + for (Label label : startLabels ) + { + label.setVisible(false); + } }); stage.show();