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 e6cefdb..a5c0972 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 @@ -5,14 +5,19 @@ +<<<<<<< HEAD +======= + + +>>>>>>> c070a72d9131552445c751d71391bab4f0059fd4 - + 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 f0fb070..628219f 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 @@ -19,10 +19,29 @@ public class HappyBirdMain extends Application { @Override public void start(Stage stage) throws IOException { - FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("happyBird.fxml")); + /*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(); + + 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, + BackgroundRepeat.NO_REPEAT, + BackgroundRepeat.NO_REPEAT, + BackgroundPosition.DEFAULT, + BackgroundSize.DEFAULT + ); + + Background background = new Background(backgroundImageImg); + stackPane.setBackground(background); + stage.show(); } } diff --git a/Happy_Bird/src/main/resources/com/example/happy_bird/happyBird.fxml b/Happy_Bird/src/main/resources/com/example/happy_bird/happyBird.fxml index e6cefdb..a5c0972 100644 --- a/Happy_Bird/src/main/resources/com/example/happy_bird/happyBird.fxml +++ b/Happy_Bird/src/main/resources/com/example/happy_bird/happyBird.fxml @@ -5,14 +5,19 @@ +<<<<<<< HEAD +======= + + +>>>>>>> c070a72d9131552445c751d71391bab4f0059fd4 - +