From e0823c9854399121eb833d0472bdef7dea425e42 Mon Sep 17 00:00:00 2001 From: Chiara Date: Fri, 17 Apr 2020 15:51:50 +0200 Subject: [PATCH] deuxieme lien --- src/ihm/controller/MenuController.java | 4 +-- src/ihm/controller/PlayersController.java | 30 ++++++++++++++++ src/ihm/ressources/Choix_joueur.fxml | 42 +++++++++++------------ src/ihm/ressources/Plateau.fxml | 6 ---- 4 files changed, 52 insertions(+), 30 deletions(-) create mode 100644 src/ihm/controller/PlayersController.java diff --git a/src/ihm/controller/MenuController.java b/src/ihm/controller/MenuController.java index 5eb3801..f8a3f7e 100644 --- a/src/ihm/controller/MenuController.java +++ b/src/ihm/controller/MenuController.java @@ -10,7 +10,6 @@ import javafx.fxml.Initializable; import javafx.scene.input.MouseEvent; import javafx.scene.layout.BorderPane; import javafx.scene.layout.Pane; -import javafx.stage.Stage; public class MenuController implements Initializable{ @FXML @@ -24,9 +23,8 @@ public class MenuController implements Initializable{ @FXML public void commencerPartie(MouseEvent mouseEvent) throws IOException{ - System.out.println("Bonjouuuuur!"); + System.out.println("Passage à l'écran de choix des joueurs"); BorderPane pane = FXMLLoader.load(getClass().getResource("../ressources/Choix_joueur.fxml")); - System.out.println(rootPane); rootPane.getChildren().setAll(pane); } diff --git a/src/ihm/controller/PlayersController.java b/src/ihm/controller/PlayersController.java new file mode 100644 index 0000000..2298c74 --- /dev/null +++ b/src/ihm/controller/PlayersController.java @@ -0,0 +1,30 @@ +package ihm.controller; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.Pane; + +public class PlayersController implements Initializable{ + @FXML + private BorderPane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + + @FXML + public void commencerJeux(MouseEvent mouseEvent) throws IOException{ + System.out.println("Lancement du jeu..."); + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/Plateau.fxml")); + rootPane.getChildren().setAll(pane); + } +} diff --git a/src/ihm/ressources/Choix_joueur.fxml b/src/ihm/ressources/Choix_joueur.fxml index fd6a8c2..676b57e 100644 --- a/src/ihm/ressources/Choix_joueur.fxml +++ b/src/ihm/ressources/Choix_joueur.fxml @@ -10,9 +10,9 @@ - + - @@ -20,17 +20,17 @@ - @@ -58,16 +58,16 @@ - - - @@ -77,19 +77,19 @@ - + - + - + - + @@ -125,16 +125,16 @@ - - - @@ -142,19 +142,19 @@ - + - + - + - + diff --git a/src/ihm/ressources/Plateau.fxml b/src/ihm/ressources/Plateau.fxml index 20b8450..66059d7 100644 --- a/src/ihm/ressources/Plateau.fxml +++ b/src/ihm/ressources/Plateau.fxml @@ -180,17 +180,14 @@ -<<<<<<< HEAD -======= ->>>>>>> 88af99848491a78118cac6121fa65e6c2ffd3f56 @@ -213,17 +210,14 @@ -<<<<<<< HEAD -======= ->>>>>>> 88af99848491a78118cac6121fa65e6c2ffd3f56