ScreenLevelFinish #64

Merged
Mat_02 merged 11 commits from ScreenLevelFinish into master 2023-05-18 19:03:56 +02:00
Showing only changes of commit fbaa79d35e - Show all commits

View File

@ -15,14 +15,15 @@ public class MenuAccueil extends StackPane {
public MenuAccueil(){
super();
//create all the objet that I need
ChoiceBox SlctDifficulty = new ChoiceBox();
ChoiceBox<String> SlctDifficulty = new ChoiceBox<>();
SlctDifficulty.getItems().addAll("Easy", "Medium", "Difficult");
Label RdmLvl = new Label("Random Level : ");
Button SelectLevel= new Button("Select Level");
Label Title = new Label("Welcome to Road to Master");
SlctDifficulty.setOnAction(event -> {
String choosediff = SlctDifficulty.getSelectionModel().getSelectedItem().toString();
String choosediff = SlctDifficulty.getSelectionModel().getSelectedItem();
System.out.println(choosediff);
switch(choosediff){
case "Easy":
SlctDifficulty.setOnAction(event1 -> MapGenerator.generate(MapGenerator.Difficulty.Easy));