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.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import school_project.Controller;
public class MenuAccueil extends BorderPane {


    public MenuAccueil(){
        super();
        //create all the objet that i need
        Button Play = new Button("Play");
        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));
        SelectLevel.setOnAction(event ->  Controller.switchRoot(new MenuLevel(1)));
        getStyleClass().add("BorderPane");
        getStylesheets().add(String.valueOf(getClass().getResource("StyleMenuAcceuil.css")));



    }



}
