Lien entre les interfaces

This commit is contained in:
Yessine Ben El Bey 2020-04-22 16:52:26 +02:00
parent 3e1637c525
commit 8cf84c224b
20 changed files with 295 additions and 26 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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
}
}

View File

@ -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);
}
}

View File

@ -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 RecevoirBlessureController implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
}

View File

@ -8,8 +8,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTourDonnerVisionController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
@ -17,7 +16,7 @@
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 1" />
<Button mnemonicParsing="false" onMouseClicked="#attaquer" text="Joueur 1" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">

View File

@ -7,8 +7,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PiocherLumiereTenebreController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>

View File

@ -8,7 +8,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PiocherVisionController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
@ -37,7 +37,7 @@
</HBox>
<HBox alignment="CENTER" prefHeight="69.0" prefWidth="600.0">
<children>
<Button mnemonicParsing="false" text="Voir carte" />
<Button mnemonicParsing="false" onMouseClicked="#voirCarte" text="Voir carte" />
</children>
</HBox>
</children>

View File

@ -5,8 +5,7 @@
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.RecevoirBlessureController">
<children>
<HBox alignment="CENTER" layoutY="1.0" prefHeight="400.0" prefWidth="600.0">
<children>

View File

@ -7,7 +7,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="589.0" prefWidth="881.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="589.0" prefWidth="881.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour1Controller">
<children>
<Label layoutX="265.0" layoutY="29.0" text="C'est au tour du ">
<font>
@ -16,7 +16,7 @@
</Label>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="200.0" layoutX="221.0" layoutY="135.0" stroke="BLACK" strokeType="INSIDE" width="200.0" />
<Polygon fill="DODGERBLUE" layoutX="551.0" layoutY="216.0" points="-75.79998779296875, 98.80001831054688, 97.0, 98.80001831054688, 8.20001220703125, -59.199981689453125" stroke="BLACK" strokeType="INSIDE" />
<Button layoutX="401.0" layoutY="394.0" mnemonicParsing="false" text="Lancer les dés" />
<Button layoutX="401.0" layoutY="394.0" mnemonicParsing="false" onMouseClicked="#lancerDes" text="Lancer les dés" />
<Label layoutX="275.0" layoutY="222.0" text="Score dés 1">
<font>
<Font size="18.0" />

View File

@ -6,8 +6,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="534.0" prefWidth="714.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="534.0" prefWidth="714.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour2Controller">
<children>
<Label layoutX="355.0" layoutY="172.0" text="Description capacité de la carte lieux ">
<font>
@ -15,8 +14,8 @@
</font>
</Label>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="268.0" layoutX="96.0" layoutY="147.0" stroke="BLACK" strokeType="INSIDE" width="200.0" />
<Button layoutX="348.0" layoutY="242.0" mnemonicParsing="false" text="Utiliser la capacité du lieux" />
<Button layoutX="542.0" layoutY="242.0" mnemonicParsing="false" text="Sauter cette étape" />
<Button layoutX="348.0" layoutY="242.0" mnemonicParsing="false" onMouseClicked="#capaciteLieu" text="Utiliser la capacité du lieux" />
<Button layoutX="542.0" layoutY="242.0" mnemonicParsing="false" onMouseClicked="#ignorerEtape" text="Sauter cette étape" />
<Label layoutX="168.0" layoutY="273.0" text="Carte lieux" />
</children>
</Pane>

View File

@ -6,12 +6,11 @@
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="451.0" prefWidth="654.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="451.0" prefWidth="654.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour3Controller">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="661.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="Joueur 1" />
<Button mnemonicParsing="false" onMouseClicked="#choixJoueur" text="Joueur 1" />
<Button mnemonicParsing="false" text="Joueur 2" />
<Button mnemonicParsing="false" text="Joueur 3" />
<Button mnemonicParsing="false" text="Joueur 4" />

View File

@ -7,7 +7,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="589.0" prefWidth="881.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="589.0" prefWidth="881.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour4Controller">
<children>
<Label layoutX="401.0" layoutY="29.0" text="attaque">
<font>

View File

@ -6,8 +6,7 @@
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour5Controller">
<children>
<HBox layoutX="11.0" layoutY="14.0" prefHeight="60.0" prefWidth="345.0" spacing="30.0">
<children>

View File

@ -7,8 +7,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="419.0" prefWidth="614.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="419.0" prefWidth="614.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour6Controller">
<children>
<HBox alignment="CENTER" layoutX="97.0" layoutY="49.0" prefHeight="340.0" prefWidth="489.0" spacing="60.0">
<children>
@ -19,9 +18,9 @@
</Label>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="Carte vision" />
<Button mnemonicParsing="false" text="Carte ténébre" />
<Button mnemonicParsing="false" text="Carte lumière" />
<Button mnemonicParsing="false" onMouseClicked="#piocherVision" text="Carte vision" />
<Button mnemonicParsing="false" onMouseClicked="#piocherTenebre" text="Carte ténébre" />
<Button mnemonicParsing="false" onMouseClicked="#piocherTenebre" text="Carte lumière" />
</children>
</VBox>
</children>