|
|
|
@ -1,11 +1,14 @@
|
|
|
|
|
package controller;
|
|
|
|
|
|
|
|
|
|
import javafx.event.ActionEvent;
|
|
|
|
|
import javafx.fxml.FXML;
|
|
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
|
import javafx.fxml.Initializable;
|
|
|
|
|
import javafx.scene.control.Button;
|
|
|
|
|
import javafx.scene.control.MenuItem;
|
|
|
|
|
import javafx.scene.control.RadioButton;
|
|
|
|
|
import javafx.scene.control.ToggleGroup;
|
|
|
|
|
import javafx.scene.image.Image;
|
|
|
|
|
import javafx.scene.image.ImageView;
|
|
|
|
|
import javafx.scene.input.MouseEvent;
|
|
|
|
|
import javafx.scene.layout.AnchorPane;
|
|
|
|
|
|
|
|
|
@ -15,18 +18,41 @@ import java.util.ResourceBundle;
|
|
|
|
|
|
|
|
|
|
public class GameConfigMenuController implements Initializable {
|
|
|
|
|
|
|
|
|
|
@FXML
|
|
|
|
|
private AnchorPane levelRoot;
|
|
|
|
|
@FXML private AnchorPane levelRoot;
|
|
|
|
|
|
|
|
|
|
@FXML private RadioButton radioButton1;
|
|
|
|
|
@FXML private RadioButton radioButton2;
|
|
|
|
|
@FXML private RadioButton radioButton3;
|
|
|
|
|
@FXML private MenuItem choice1;
|
|
|
|
|
@FXML private MenuItem choice2;
|
|
|
|
|
@FXML private MenuItem choice3;
|
|
|
|
|
@FXML private ImageView ImageChange;
|
|
|
|
|
|
|
|
|
|
private int personnage;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
|
|
|
|
|
|
|
|
|
ToggleGroup group = new ToggleGroup();
|
|
|
|
|
radioButton1.setToggleGroup(group);
|
|
|
|
|
radioButton2.setToggleGroup(group);
|
|
|
|
|
radioButton3.setToggleGroup(group);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@FXML
|
|
|
|
|
void changeSkin(ActionEvent event){
|
|
|
|
|
choice1.setOnAction((e)-> {
|
|
|
|
|
ImageChange.setImage(new Image("/image/personnage/Perso1.png"));
|
|
|
|
|
this.personnage = 1;
|
|
|
|
|
});
|
|
|
|
|
choice2.setOnAction((e)-> {
|
|
|
|
|
ImageChange.setImage(new Image("/image/personnage/Perso2.png"));
|
|
|
|
|
this.personnage = 2;
|
|
|
|
|
});
|
|
|
|
|
choice3.setOnAction((e)-> {
|
|
|
|
|
ImageChange.setImage(new Image("/image/personnage/Perso3.png"));
|
|
|
|
|
this.personnage = 3;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@FXML
|
|
|
|
|
void returnToMenu(MouseEvent event) throws Exception{
|
|
|
|
|