package sample;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.chart.PieChart;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;

import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Objects;
import java.util.ResourceBundle;

public class TopPlayerController implements Initializable {

    @FXML
    private AnchorPane levelRoot;

    @FXML
    private Button returnToMenu;


    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {

    }

    @FXML
    void returnToMenu(MouseEvent event) throws  Exception{
        AnchorPane pane = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("MainPage.fxml")));
        levelRoot.getChildren().setAll(pane);
    }

}
