diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin index b1a88a9..307dee7 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 dd891be..a4a63f1 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 335df1b..04eb98e 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 d78096f..94e24bd 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 d3bdc32..71a1a2a 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 094d2c5..68e2b0c 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 a6781af..08c92f8 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/tmp/compileJava/previous-compilation-data.bin b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin index cd0d691..14519ba 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 628219f..a5af2d6 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 @@ -3,12 +3,17 @@ package com.example.happy_bird; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.geometry.Insets; +import javafx.geometry.Pos; import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.Label; import javafx.scene.image.*; +import javafx.scene.image.Image; import javafx.scene.layout.*; -import javafx.scene.paint.*; +import javafx.scene.text.TextAlignment; import javafx.stage.Stage; +import java.awt.*; import java.io.IOException; public class HappyBirdMain extends Application { @@ -19,17 +24,12 @@ public class HappyBirdMain extends Application { @Override public void start(Stage stage) throws IOException { - /*FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("happyBird.fxml")); - Scene scene = new Scene(fxmlLoader.load(), 800, 700); - stage.setTitle("HappyBird"); - stage.setScene(scene); - stage.show();*/ - - StackPane stackPane = new StackPane(); + Pane stackPane = new Pane(); Scene scene = new Scene(stackPane, 800, 700); stage.setTitle("Happy Bird"); stage.setScene(scene); + Image image = new Image("file:src/main/resources/com/example/happy_bird/pics/Background.png"); BackgroundImage backgroundImageImg = new BackgroundImage( image, @@ -41,7 +41,48 @@ public class HappyBirdMain extends Application { Background background = new Background(backgroundImageImg); stackPane.setBackground(background); - + + Label label = new Label("Happy Bird"); + label.setPrefSize(300, 75); + label.setTextAlignment(TextAlignment.CENTER); + label.setStyle("-fx-background-color: #DED894; " + + "-fx-text-fill: #000000; " + + "-fx-font-size: 35px; " + + "-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(250); + label.setLayoutY(100); + + stackPane.getChildren().addAll(label); + + Button startButton = new Button("START"); + Button highscoresButton = new Button("HIGHSCORES"); + Button einstellungsButton = new Button("EINSTELLUNGEN"); + + Button buttons[] = {startButton, highscoresButton, einstellungsButton}; + + int yPosition = 225; + for (Button button : buttons) { + stackPane.getChildren().add(button); + button.setPrefSize(200, 50); + button.setLayoutX(300); + button.setLayoutY(yPosition); + yPosition += 100; + + button.setStyle("-fx-background-color: #e86000; " + + "-fx-text-fill: #FFFFFF; " + + "-fx-font-size: 20px; " + + "-fx-border-width: 5px;" + + "-fx-border-color: #FFFFFF;" + + "-fx-font-weight: bold;" + + "-fx-border-radius: 15px;" + + "-fx-background-radius: 20px;"); + } + stage.show(); } }