ScreenLevelFinish #64
@ -2,33 +2,40 @@ package school_project.Menu;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ChoiceBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.text.Font;
|
||||
import school_project.Controller;
|
||||
public class MenuAccueil extends BorderPane {
|
||||
public class MenuAccueil extends StackPane {
|
||||
|
||||
|
||||
public MenuAccueil(){
|
||||
super();
|
||||
//create all the objet that i need
|
||||
Button Play = new Button("Play");
|
||||
//create all the objet that I need
|
||||
ChoiceBox SlctDifficulty = new ChoiceBox();
|
||||
SlctDifficulty.getItems().addAll("Easy", "Medium", "Hard");
|
||||
Label RdmLvl = new Label("Random Level : ");
|
||||
Button SelectLevel= new Button("Select Level");
|
||||
Button Trophy = new Button("Trophy");
|
||||
Label Title = new Label("Welcome to Road to Master");
|
||||
//set up all the Button where i need
|
||||
setTop(Title);
|
||||
setLeft(Play);
|
||||
setRight(SelectLevel);
|
||||
setBottom(Trophy);
|
||||
Title.setFont(Font.font(20));
|
||||
Title.setTextFill(Color.GOLD);
|
||||
setAlignment(Title, Pos.CENTER);
|
||||
setAlignment(Play,Pos.CENTER);
|
||||
setAlignment(SelectLevel,Pos.CENTER);
|
||||
setAlignment(Trophy,Pos.CENTER);
|
||||
setPadding(new Insets(20,60,20,60));
|
||||
|
||||
//set up all the Button where I need
|
||||
getChildren().addAll(Title,SlctDifficulty,SelectLevel,RdmLvl);
|
||||
RdmLvl.setFont(Font.font(25));
|
||||
RdmLvl.setTextFill(Color.GOLD);
|
||||
Title.setFont(Font.font(40));
|
||||
Title.setTextFill(Color.RED);
|
||||
setAlignment(Title, Pos.TOP_CENTER);
|
||||
setAlignment(SlctDifficulty,Pos.CENTER_LEFT);
|
||||
setAlignment(SelectLevel,Pos.CENTER_RIGHT);
|
||||
setAlignment(RdmLvl, Pos.CENTER_LEFT);
|
||||
|
||||
setMargin(RdmLvl,new Insets(0,0,0,100));
|
||||
Mat_02 marked this conversation as resolved
|
||||
setMargin(SlctDifficulty,new Insets(0,0,0,300));
|
||||
setMargin(SelectLevel,new Insets(0,300,0,0));
|
||||
setMargin(Title,new Insets(200,0,0,0));
|
||||
|
||||
SelectLevel.setOnAction(event -> Controller.switchRoot(new MenuLevel(1)));
|
||||
getStyleClass().add("BorderPane");
|
||||
getStylesheets().add(String.valueOf(getClass().getResource("StyleMenuAcceuil.css")));
|
||||
|
Loading…
Reference in New Issue
Block a user
Le
MapGenerator.generate()
retourne uneMap
Cette Map doit ensuite être chargée par
GameUI(Map)
Il faudrait du coup