diff --git a/src/ihm/Main.java b/src/ihm/Main.java index bee5032..b357b46 100644 --- a/src/ihm/Main.java +++ b/src/ihm/Main.java @@ -10,7 +10,7 @@ import javafx.stage.Stage; public class Main extends Application{ @Override public void start(Stage primaryStage) throws Exception{ - Parent root = FXMLLoader.load(getClass().getResource("ressources/Menu.fxml")); + Parent root = FXMLLoader.load(getClass().getResource("ressources/jouerSonTour6.fxml")); primaryStage.setTitle("Shadow Hunters"); primaryStage.setScene(new Scene(root)); primaryStage.show(); diff --git a/src/ihm/PopUp.java b/src/ihm/PopUp.java index 98d9acc..6fea44f 100644 --- a/src/ihm/PopUp.java +++ b/src/ihm/PopUp.java @@ -1,16 +1,15 @@ package ihm; +import javafx.scene.Parent; import javafx.scene.Scene; -import javafx.scene.layout.Pane; import javafx.stage.Modality; import javafx.stage.Stage; public class PopUp { private Scene scene; private Stage popupwindow; - private Pane pane; - public PopUp (Pane p, String titre) { + public PopUp (Parent p, String titre) { popupwindow = new Stage(); popupwindow.initModality(Modality.APPLICATION_MODAL); diff --git a/src/ihm/controller/AfficherCarteController.java b/src/ihm/controller/AfficherCarteController.java index 3b1fa3d..6b04fc3 100644 --- a/src/ihm/controller/AfficherCarteController.java +++ b/src/ihm/controller/AfficherCarteController.java @@ -7,6 +7,7 @@ import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Label; import javafx.scene.layout.Pane; +import main.Joueur; public class AfficherCarteController implements Initializable{ @@ -14,13 +15,13 @@ public class AfficherCarteController implements Initializable{ @FXML private Label competence; @FXML private Pane root; - private PlateauController plateau; - @Override public void initialize(URL arg0, ResourceBundle arg1) { - System.out.println(root.getUserData()); - //nom.setText((String) root.getUserData()); - competence.setText("dfghjk"); } + + public void showInformation(Joueur j) { + //nom.setText(j.getCartePersonnage().getNom()); + //competence.setText(j.getCartePersonnage().getDescription()); + } } diff --git a/src/ihm/controller/JouerSonTour1Controller.java b/src/ihm/controller/JouerSonTour1Controller.java new file mode 100644 index 0000000..57571b9 --- /dev/null +++ b/src/ihm/controller/JouerSonTour1Controller.java @@ -0,0 +1,26 @@ +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 JouerSonTour1Controller implements Initializable{ + @FXML private Pane rootPane; + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + + } + @FXML + public void lancerDes(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour2.fxml")); + rootPane.getChildren().setAll(pane); + } +} diff --git a/src/ihm/controller/JouerSonTour2Controller.java b/src/ihm/controller/JouerSonTour2Controller.java new file mode 100644 index 0000000..f0fceec --- /dev/null +++ b/src/ihm/controller/JouerSonTour2Controller.java @@ -0,0 +1,37 @@ +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 JouerSonTour2Controller implements Initializable{ + @FXML private Pane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + @FXML + public void ignorerEtape(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour3.fxml")); + rootPane.getChildren().setAll(pane); + + } + @FXML + public void capaciteLieu(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour5.fxml")); + rootPane.getChildren().setAll(pane); + + } + +} diff --git a/src/ihm/controller/JouerSonTour3Controller.java b/src/ihm/controller/JouerSonTour3Controller.java new file mode 100644 index 0000000..413a964 --- /dev/null +++ b/src/ihm/controller/JouerSonTour3Controller.java @@ -0,0 +1,35 @@ +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.Pane; + +public class JouerSonTour3Controller implements Initializable{ + @FXML private Pane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + System.out.println("nulle"); + } + + @FXML + public void choixJoueur(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour4.fxml")); + rootPane.getChildren().setAll(pane); + + } + @FXML + public void equipementVole(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour5.fxml")); + rootPane.getChildren().setAll(pane); + + } +} diff --git a/src/ihm/controller/JouerSonTour4Controller.java b/src/ihm/controller/JouerSonTour4Controller.java new file mode 100644 index 0000000..e654473 --- /dev/null +++ b/src/ihm/controller/JouerSonTour4Controller.java @@ -0,0 +1,19 @@ +package ihm.controller; + +import java.net.URL; +import java.util.ResourceBundle; + +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.layout.Pane; + +public class JouerSonTour4Controller implements Initializable{ + @FXML private Pane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/ihm/controller/JouerSonTour5Controller.java b/src/ihm/controller/JouerSonTour5Controller.java new file mode 100644 index 0000000..4370c22 --- /dev/null +++ b/src/ihm/controller/JouerSonTour5Controller.java @@ -0,0 +1,29 @@ +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.Pane; + +public class JouerSonTour5Controller implements Initializable{ + @FXML private Pane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + @FXML + public void equipementVole(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour6.fxml")); + rootPane.getChildren().setAll(pane); + + } + +} diff --git a/src/ihm/controller/JouerSonTour6Controller.java b/src/ihm/controller/JouerSonTour6Controller.java new file mode 100644 index 0000000..ff0d29f --- /dev/null +++ b/src/ihm/controller/JouerSonTour6Controller.java @@ -0,0 +1,35 @@ +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.Pane; + +public class JouerSonTour6Controller implements Initializable{ + @FXML private Pane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + @FXML + public void piocherVision(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_piocher_vision.fxml")); + rootPane.getChildren().setAll(pane); + + } + @FXML + public void piocherTenebre(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_piocher_lum_et_ten.fxml")); + rootPane.getChildren().setAll(pane); + + } +} diff --git a/src/ihm/controller/JouerSonTourDonnerVisionController.java b/src/ihm/controller/JouerSonTourDonnerVisionController.java new file mode 100644 index 0000000..0e05337 --- /dev/null +++ b/src/ihm/controller/JouerSonTourDonnerVisionController.java @@ -0,0 +1,29 @@ +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.Pane; + +public class JouerSonTourDonnerVisionController implements Initializable{ + @FXML private Pane rootPane; + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + @FXML + public void attaquer(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_recevoir_blessure.fxml")); + rootPane.getChildren().setAll(pane); + + } + + +} diff --git a/src/ihm/controller/MenuController.java b/src/ihm/controller/MenuController.java index c8ea3d8..7e9e0d2 100644 --- a/src/ihm/controller/MenuController.java +++ b/src/ihm/controller/MenuController.java @@ -1,5 +1,7 @@ package ihm.controller; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; @@ -20,8 +22,14 @@ public class MenuController implements Initializable{ @Override public void initialize(URL arg0, ResourceBundle arg1) { // TODO Auto-generated method stub - //Image image = new Image("../ressources/img/logo.png"); - //titre.setImage(image); + FileInputStream input; + try { + input = new FileInputStream("src\\ihm\\ressources\\img\\logo.png"); + Image image = new Image(input); + titre.setImage(image); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } } @FXML diff --git a/src/ihm/controller/PiocherLumiereTenebreController.java b/src/ihm/controller/PiocherLumiereTenebreController.java new file mode 100644 index 0000000..f1afaeb --- /dev/null +++ b/src/ihm/controller/PiocherLumiereTenebreController.java @@ -0,0 +1,19 @@ +package ihm.controller; + +import java.net.URL; +import java.util.ResourceBundle; + +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.layout.Pane; + +public class PiocherLumiereTenebreController implements Initializable{ + @FXML private Pane rootPane; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/ihm/controller/PiocherVisionController.java b/src/ihm/controller/PiocherVisionController.java new file mode 100644 index 0000000..4c9f460 --- /dev/null +++ b/src/ihm/controller/PiocherVisionController.java @@ -0,0 +1,28 @@ +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.Pane; + +public class PiocherVisionController implements Initializable{ + @FXML private Pane rootPane; + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + // TODO Auto-generated method stub + + } + @FXML + public void voirCarte(MouseEvent mouseEvent) throws IOException{ + + Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_donner_vision.fxml")); + rootPane.getChildren().setAll(pane); + + } + +} diff --git a/src/ihm/controller/PlateauController.java b/src/ihm/controller/PlateauController.java index 8f3e8bf..f5f4201 100644 --- a/src/ihm/controller/PlateauController.java +++ b/src/ihm/controller/PlateauController.java @@ -11,17 +11,14 @@ import ihm.PopUp; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; +import javafx.scene.Parent; import javafx.scene.control.Button; import javafx.scene.control.Label; -import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; -import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import main.Joueur; public class PlateauController implements Initializable { - @FXML private BorderPane root; - private List listJoueur = new ArrayList(); private List vboxJoueur = new ArrayList(); private List - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/ihm/ressources/Jouer_son_tour_donner_vision.fxml b/src/ihm/ressources/Jouer_son_tour_donner_vision.fxml index 37aa827..bbfc643 100644 --- a/src/ihm/ressources/Jouer_son_tour_donner_vision.fxml +++ b/src/ihm/ressources/Jouer_son_tour_donner_vision.fxml @@ -8,8 +8,7 @@ - - + @@ -17,7 +16,7 @@ -