diff --git a/app/src/main/java/school_project/Menu/ScreenLevelFinish.java b/app/src/main/java/school_project/Menu/ScreenLevelFinish.java new file mode 100644 index 0000000..e7a2b06 --- /dev/null +++ b/app/src/main/java/school_project/Menu/ScreenLevelFinish.java @@ -0,0 +1,37 @@ +package school_project.Menu; + + +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.control.Button; +import javafx.scene.control.Label; + +import javafx.scene.layout.StackPane; +import javafx.scene.text.Font; +import school_project.Controller; + +public class ScreenLevelFinish extends StackPane { + + public ScreenLevelFinish(){ + super(); + Label CongraMess = new Label(" LEVEL DONE GREAT JOB "); + CongraMess.setFont(Font.font(40)); + Button BckMenu = new Button("Back to Menu"); + BckMenu.setFont(Font.font(25)); + Button ChooseLvl = new Button("Choose level"); + ChooseLvl.setFont(Font.font(25)); + BckMenu.setOnAction(event -> Controller.switchRoot(new MenuAccueil())); + ChooseLvl.setOnAction(event -> Controller.switchRoot(new MenuLevel(1))); + getChildren().addAll(BckMenu,ChooseLvl,CongraMess); + setAlignment(BckMenu, Pos.CENTER_RIGHT); + setAlignment(ChooseLvl, Pos.CENTER_LEFT); + setAlignment(CongraMess, Pos.TOP_CENTER); + setMargin(BckMenu, new Insets(0,300,0,0 )); + setMargin(ChooseLvl,new Insets(0,0,0,300)); + setMargin(CongraMess,new Insets(300,0,0,0)); + getStyleClass().add("StackPane"); + getStylesheets().add(String.valueOf(getClass().getResource("StyleMenuAcceuil.css"))); + + + } +} diff --git a/app/src/main/resources/school_project/Menu/BackGround-LvlFinish.jpg b/app/src/main/resources/school_project/Menu/BackGround-LvlFinish.jpg new file mode 100644 index 0000000..1131d13 Binary files /dev/null and b/app/src/main/resources/school_project/Menu/BackGround-LvlFinish.jpg differ diff --git a/app/src/main/resources/school_project/Menu/StyleMenuAcceuil.css b/app/src/main/resources/school_project/Menu/StyleMenuAcceuil.css index 1fb30c0..070cd43 100644 --- a/app/src/main/resources/school_project/Menu/StyleMenuAcceuil.css +++ b/app/src/main/resources/school_project/Menu/StyleMenuAcceuil.css @@ -5,4 +5,8 @@ .GridPane{ -fx-background-image: url("Background-select-level.jpg"); -fx-background-position:right; + +} +.StackPane{ + -fx-background-image: url("BackGround-LvlFinish.jpg"); } \ No newline at end of file