Merge branch 'development' of https://github.com/PTE-SH/ShadowHunterGame into development
This commit is contained in:
commit
5e2bc89af0
@ -33,7 +33,7 @@ public class ChoisirJoueur implements Initializable{
|
|||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
|
||||||
this.buttons = new ArrayList<Button>();
|
this.buttons = new ArrayList<Button>();
|
||||||
|
|
||||||
this.buttons.add(btn1);
|
this.buttons.add(btn1);
|
||||||
this.buttons.add(btn2);
|
this.buttons.add(btn2);
|
||||||
this.buttons.add(btn3);
|
this.buttons.add(btn3);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ihm.controller;
|
package ihm.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -66,6 +67,8 @@ public class PlateauController implements Initializable {
|
|||||||
public static int DICE_QUATRE = 0;
|
public static int DICE_QUATRE = 0;
|
||||||
public static int DICE_BOTH = 2;
|
public static int DICE_BOTH = 2;
|
||||||
|
|
||||||
|
private final double RES = 200./2250.;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initialise les données du plateau
|
* initialise les données du plateau
|
||||||
*/
|
*/
|
||||||
@ -104,88 +107,6 @@ public class PlateauController implements Initializable {
|
|||||||
List<ImageView> ivs = this.getLieux();
|
List<ImageView> ivs = this.getLieux();
|
||||||
|
|
||||||
applyImages(cl,ivs);
|
applyImages(cl,ivs);
|
||||||
|
|
||||||
// BUTTONS ETC
|
|
||||||
//System.out.println(this.joueursPane);
|
|
||||||
|
|
||||||
/*
|
|
||||||
this.hboxJoueur.add(joueur1);
|
|
||||||
this.hboxJoueur.add(joueur2);
|
|
||||||
this.hboxJoueur.add(joueur3);
|
|
||||||
this.hboxJoueur.add(joueur4);
|
|
||||||
|
|
||||||
for (HBox hbox : hboxJoueur) {
|
|
||||||
tour.add((AnchorPane) hbox.getChildren().get(0));
|
|
||||||
VBox carte = (VBox) hbox.getChildren().get(1);
|
|
||||||
cartePerso.add((ImageView) carte.getChildren().get(0));
|
|
||||||
btnRevelation.add((Button) carte.getChildren().get(1));
|
|
||||||
VBox info = (VBox) hbox.getChildren().get(2);
|
|
||||||
nomJoueur.add((Label) info.getChildren().get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.vboxJoueur.add(joueur5);
|
|
||||||
this.vboxJoueur.add(joueur6);
|
|
||||||
this.vboxJoueur.add(joueur7);
|
|
||||||
this.vboxJoueur.add(joueur8);
|
|
||||||
|
|
||||||
for (VBox vbox : vboxJoueur) {
|
|
||||||
tour.add((AnchorPane) vbox.getChildren().get(0));
|
|
||||||
HBox joueur = (HBox) vbox.getChildren().get(1);
|
|
||||||
VBox carte = (VBox) joueur.getChildren().get(1);
|
|
||||||
cartePerso.add((ImageView) carte.getChildren().get(0));
|
|
||||||
btnRevelation.add((Button) carte.getChildren().get(1));
|
|
||||||
VBox info = (VBox) joueur.getChildren().get(0);
|
|
||||||
nomJoueur.add((Label) info.getChildren().get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
//initilaisation des boutons se reveler
|
|
||||||
int i = 0;
|
|
||||||
for (Button b : btnRevelation) {
|
|
||||||
int compteur = i;
|
|
||||||
b.setOnAction(e -> {try {seReveler(compteur);} catch (IOException e1) {e1.printStackTrace();}});
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
//initialisation des bouton carte personnage
|
|
||||||
int j = 0;
|
|
||||||
for (ImageView b : cartePerso) {
|
|
||||||
int compteur = j;
|
|
||||||
b.setOnMouseClicked(e -> {try {consulterSaCarte(compteur);} catch (IOException e1) {e1.printStackTrace();}});
|
|
||||||
j++;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
//initialisation des pions
|
|
||||||
VBox pionLieux14 = (VBox) lieux.getChildren().get(0);
|
|
||||||
VBox pionLieux58 = (VBox) lieux.getChildren().get(4);
|
|
||||||
for (int k=0; k<4; k++) {
|
|
||||||
pionLieux.add((Circle) pionLieux14.getChildren().get(k));
|
|
||||||
}
|
|
||||||
for (int k=0; k<4; k++) {
|
|
||||||
pionLieux.add((Circle) pionLieux58.getChildren().get(k));
|
|
||||||
}
|
|
||||||
|
|
||||||
VBox pionVie14 = (VBox) lieux.getChildren().get(0);
|
|
||||||
VBox pionVie58 = (VBox) lieux.getChildren().get(4);
|
|
||||||
for (int k=0; k<4; k++) {
|
|
||||||
pionVie.add((Circle) pionVie14.getChildren().get(k));
|
|
||||||
}
|
|
||||||
for (int k=0; k<4; k++) {
|
|
||||||
pionVie.add((Circle) pionVie58.getChildren().get(k));
|
|
||||||
}
|
|
||||||
|
|
||||||
System.out.println("Tour du joueur 1");
|
|
||||||
|
|
||||||
try {
|
|
||||||
final URL fxmlURL = getClass().getResource("../ressources/Jouer_tour(1)lancer_des.fxml");
|
|
||||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
|
||||||
Pane root = fxmlLoader.load();
|
|
||||||
root.setPrefSize(255, 180);
|
|
||||||
tour.get(2).getChildren().setAll(root);
|
|
||||||
} catch (IOException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,9 +132,14 @@ public class PlateauController implements Initializable {
|
|||||||
|
|
||||||
StackPane sp = (StackPane) iv.getParent();
|
StackPane sp = (StackPane) iv.getParent();
|
||||||
iv.setImage(im);
|
iv.setImage(im);
|
||||||
iv.fitHeightProperty().bind(sp.heightProperty());
|
Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
|
||||||
|
iv.setFitWidth(RES*screenSize.width);
|
||||||
|
//iv.fitHeightProperty().bind(sp.heightProperty());
|
||||||
|
//iv.fitWidthProperty().bind(sp.widthProperty());
|
||||||
|
|
||||||
|
iv.setPreserveRatio(true);
|
||||||
|
//iv.fitWidthProperty().bind(sp.widthProperty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Pane getPaneJoueur(int i) {
|
private Pane getPaneJoueur(int i) {
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.CheckBox?>
|
<?import javafx.scene.control.CheckBox?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.RadioButton?>
|
||||||
<?import javafx.scene.control.TextField?>
|
<?import javafx.scene.control.TextField?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.BorderPane?>
|
<?import javafx.scene.layout.BorderPane?>
|
||||||
@ -11,152 +12,204 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<AnchorPane fx:id="rootPane" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
|
<AnchorPane fx:id="rootPane" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
|
||||||
<children>
|
<children>
|
||||||
<BorderPane styleClass="background" stylesheets="@style/menu.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<BorderPane styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<left>
|
<left>
|
||||||
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="240.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="240.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox fx:id="hb7" alignment="CENTER_RIGHT" prefHeight="67.0" prefWidth="340.0" rotate="90.0">
|
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="214.0" rotate="180.0" spacing="150.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
<HBox alignment="CENTER_RIGHT" prefWidth="274.0" rotate="270.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
</font>
|
<children>
|
||||||
</TextField>
|
<HBox alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<children>
|
||||||
<font>
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<Font size="24.0" />
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
</font>
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<HBox.margin>
|
</children>
|
||||||
<Insets left="10.0" right="10.0" />
|
</HBox>
|
||||||
</HBox.margin>
|
<HBox fx:id="hb8" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<padding>
|
<children>
|
||||||
<Insets right="5.0" />
|
<TextField prefHeight="51.0" prefWidth="149.0">
|
||||||
</padding>
|
<font>
|
||||||
</Button>
|
<Font size="24.0" />
|
||||||
<CheckBox mnemonicParsing="false">
|
</font>
|
||||||
<font>
|
</TextField>
|
||||||
<Font size="24.0" />
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+">
|
||||||
</font>
|
<font>
|
||||||
</CheckBox>
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox alignment="CENTER_RIGHT" layoutX="10.0" layoutY="304.0" prefHeight="100.0" prefWidth="299.0" rotate="270.0">
|
||||||
|
<children>
|
||||||
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
|
<children>
|
||||||
|
<HBox alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
|
<children>
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox fx:id="hb7" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
|
<children>
|
||||||
|
<TextField prefHeight="51.0" prefWidth="149.0">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</TextField>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
<VBox.margin>
|
</VBox>
|
||||||
<Insets bottom="150.0" left="-100.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
|
||||||
<HBox fx:id="hb8" alignment="CENTER_LEFT" rotate="90.0">
|
|
||||||
<children>
|
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</TextField>
|
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="10.0" right="10.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
<padding>
|
|
||||||
<Insets right="5.0" />
|
|
||||||
</padding>
|
|
||||||
</Button>
|
|
||||||
<CheckBox mnemonicParsing="false">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</CheckBox>
|
|
||||||
</children>
|
|
||||||
<VBox.margin>
|
|
||||||
<Insets left="-100.0" top="200.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="248.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="214.0" spacing="150.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox fx:id="hb4" alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
|
<HBox alignment="CENTER_RIGHT" prefWidth="274.0" rotate="270.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<HBox alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
</font>
|
<children>
|
||||||
</TextField>
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<font>
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<Font size="24.0" />
|
</children>
|
||||||
</font>
|
</HBox>
|
||||||
<HBox.margin>
|
<HBox fx:id="hb4" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<Insets left="10.0" right="10.0" />
|
<children>
|
||||||
</HBox.margin>
|
<TextField prefHeight="51.0" prefWidth="149.0">
|
||||||
<padding>
|
<font>
|
||||||
<Insets right="5.0" />
|
<Font size="24.0" />
|
||||||
</padding>
|
</font>
|
||||||
</Button>
|
</TextField>
|
||||||
<CheckBox mnemonicParsing="false">
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
</CheckBox>
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
<VBox.margin>
|
|
||||||
<Insets bottom="150.0" right="-100.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox fx:id="hb3" alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
|
<HBox alignment="CENTER_RIGHT" layoutX="10.0" layoutY="304.0" prefHeight="100.0" prefWidth="299.0" rotate="270.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<HBox alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
</font>
|
<children>
|
||||||
</TextField>
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<font>
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
<Font size="24.0" />
|
</children>
|
||||||
</font>
|
</HBox>
|
||||||
<padding>
|
<HBox fx:id="hb3" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<Insets right="5.0" />
|
<children>
|
||||||
</padding>
|
<TextField prefHeight="51.0" prefWidth="149.0">
|
||||||
<HBox.margin>
|
<font>
|
||||||
<Insets left="10.0" right="10.0" />
|
<Font size="24.0" />
|
||||||
</HBox.margin>
|
</font>
|
||||||
</Button>
|
</TextField>
|
||||||
<CheckBox mnemonicParsing="false">
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
</CheckBox>
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
<VBox.margin>
|
|
||||||
<Insets right="-100.0" top="150.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</right>
|
</right>
|
||||||
<center>
|
<center>
|
||||||
<VBox alignment="CENTER" prefHeight="486.0" prefWidth="392.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="486.0" prefWidth="553.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<Label styleClass="titre" stylesheets="@style/menu.css" text="%entrez.nom.joueur">
|
<Label styleClass="titre" text="%entrez.nom.joueur">
|
||||||
<font>
|
<font>
|
||||||
<Font size="48.0" />
|
<Font size="48.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label styleClass="titre" stylesheets="@style/menu.css" text="%nombre.joueur.minimum">
|
<Label styleClass="titre" text="%nombre.joueur.minimum">
|
||||||
<font>
|
<font>
|
||||||
<Font size="36.0" />
|
<Font size="36.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label styleClass="titre" stylesheets="@style/menu.css" text="%cocher.case">
|
<Label styleClass="titre" text="%cocher.case">
|
||||||
<font>
|
<font>
|
||||||
<Font size="36.0" />
|
<Font size="36.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" stylesheets="@style/menu.css" text="%commencer.partie">
|
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" text="%commencer.partie">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
@ -164,7 +217,7 @@
|
|||||||
<Insets top="20.0" />
|
<Insets top="20.0" />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="283.0" layoutY="379.0" mnemonicParsing="false" onMouseClicked="#retour" prefHeight="55.0" prefWidth="247.0" styleClass="bouton" stylesheets="@style/menu.css" text="Retour">
|
<Button layoutX="283.0" layoutY="379.0" mnemonicParsing="false" onMouseClicked="#retour" prefHeight="55.0" prefWidth="247.0" styleClass="bouton" text="Retour">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
@ -178,94 +231,16 @@
|
|||||||
<top>
|
<top>
|
||||||
<HBox alignment="CENTER" prefHeight="110.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
|
<HBox alignment="CENTER" prefHeight="110.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox fx:id="hb6" alignment="CENTER" rotate="180.0">
|
<VBox alignment="CENTER" prefHeight="110.0" prefWidth="559.0" spacing="10.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField>
|
<HBox fx:id="hb6" alignment="CENTER" prefWidth="754.0">
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</TextField>
|
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="10.0" right="10.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Button>
|
|
||||||
<CheckBox mnemonicParsing="false">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</CheckBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<HBox fx:id="hb5" alignment="CENTER" rotate="180.0">
|
|
||||||
<children>
|
|
||||||
<TextField accessibleRole="PARENT">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets />
|
|
||||||
</HBox.margin>
|
|
||||||
</TextField>
|
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="10.0" right="10.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Button>
|
|
||||||
<CheckBox mnemonicParsing="false">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</CheckBox>
|
|
||||||
</children>
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="30.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</top>
|
|
||||||
<bottom>
|
|
||||||
<VBox alignment="CENTER" prefHeight="94.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
|
|
||||||
<children>
|
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
|
||||||
<children>
|
|
||||||
<HBox fx:id="hb1" alignment="CENTER">
|
|
||||||
<children>
|
|
||||||
<TextField prefHeight="51.0" prefWidth="298.0">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</TextField>
|
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="10.0" right="10.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Button>
|
|
||||||
<CheckBox mnemonicParsing="false">
|
|
||||||
<font>
|
|
||||||
<Font size="24.0" />
|
|
||||||
</font>
|
|
||||||
</CheckBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<HBox fx:id="hb2" alignment="CENTER">
|
|
||||||
<children>
|
<children>
|
||||||
<TextField>
|
<TextField>
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
</TextField>
|
</TextField>
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
@ -279,13 +254,147 @@
|
|||||||
</font>
|
</font>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
</children>
|
</children>
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="30.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</HBox>
|
</HBox>
|
||||||
|
<HBox alignment="CENTER" prefHeight="20.0" prefWidth="762.0">
|
||||||
|
<children>
|
||||||
|
<RadioButton contentDisplay="CENTER" mnemonicParsing="false" rotate="180.0" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" rotate="180.0" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" rotate="180.0" text="RadioButton" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
<VBox alignment="CENTER" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<HBox fx:id="hb5" alignment="CENTER" prefHeight="55.0" prefWidth="537.0">
|
||||||
|
<children>
|
||||||
|
<TextField accessibleRole="PARENT">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
</TextField>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox alignment="CENTER" prefHeight="6.0" prefWidth="356.0">
|
||||||
|
<children>
|
||||||
|
<RadioButton mnemonicParsing="false" rotate="180.0" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" rotate="180.0" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" rotate="180.0" text="RadioButton" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
|
<bottom>
|
||||||
|
<VBox alignment="CENTER" prefHeight="0.0" prefWidth="902.0" BorderPane.alignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<HBox alignment="CENTER" prefHeight="129.0" prefWidth="1280.0">
|
||||||
|
<children>
|
||||||
|
<VBox alignment="CENTER" prefHeight="70.0" prefWidth="1338.0" spacing="20.0">
|
||||||
|
<children>
|
||||||
|
<HBox alignment="CENTER" prefHeight="43.0" prefWidth="688.0">
|
||||||
|
<children>
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="-5.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
<HBox fx:id="hb1" alignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<TextField prefHeight="51.0" prefWidth="298.0">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</TextField>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" top="-3.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
<opaqueInsets>
|
||||||
|
<Insets />
|
||||||
|
</opaqueInsets>
|
||||||
|
</VBox>
|
||||||
|
<VBox alignment="CENTER" prefHeight="70.0" prefWidth="1213.0">
|
||||||
|
<children>
|
||||||
|
<HBox alignment="CENTER" prefHeight="43.0" prefWidth="688.0">
|
||||||
|
<children>
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
<RadioButton mnemonicParsing="false" text="RadioButton" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
<HBox fx:id="hb2" alignment="CENTER" prefHeight="63.0" prefWidth="433.0">
|
||||||
|
<children>
|
||||||
|
<TextField prefHeight="51.0" prefWidth="310.0">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</TextField>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
<opaqueInsets>
|
||||||
|
<Insets />
|
||||||
|
</opaqueInsets>
|
||||||
</VBox>
|
</VBox>
|
||||||
</bottom>
|
</bottom>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#ouvrirParametres" styleClass="bouton" text="Paramètres">
|
<Button mnemonicParsing="false" onMouseClicked="#ouvrirParametres" styleClass="bouton" text="%parametre">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
<Insets bottom="25.0" />
|
<Insets bottom="25.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
<HBox alignment="CENTER" prefHeight="366.0" prefWidth="1125.0" spacing="50.0">
|
<HBox alignment="CENTER" maxWidth="1280.0" spacing="50.0">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="TOP_CENTER">
|
<VBox alignment="TOP_CENTER">
|
||||||
<children>
|
<children>
|
||||||
@ -290,14 +290,14 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
<VBox alignment="CENTER" spacing="50.0">
|
<VBox alignment="CENTER" spacing="50.0">
|
||||||
<children>
|
<children>
|
||||||
<GridPane alignment="CENTER" hgap="20.0">
|
<GridPane alignment="CENTER" hgap="20.0" maxHeight="-Infinity" prefHeight="250.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
<ColumnConstraints />
|
<ColumnConstraints />
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<GridPane>
|
<GridPane>
|
||||||
@ -324,21 +324,21 @@
|
|||||||
<ColumnConstraints />
|
<ColumnConstraints />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="TOP_CENTER" maxHeight="-Infinity" maxWidth="-Infinity" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css">
|
<HBox alignment="CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css">
|
||||||
<children>
|
<children>
|
||||||
<StackPane HBox.hgrow="NEVER">
|
<StackPane HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="150.0" fitWidth="77.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER" />
|
||||||
<FlowPane prefHeight="150.0" prefWidth="63.0" styleClass="lieu" />
|
<FlowPane styleClass="lieu" />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<StackPane layoutX="39.0" layoutY="12.0" HBox.hgrow="NEVER">
|
<StackPane layoutX="39.0" layoutY="12.0" maxHeight="360.0" HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="150.0" fitWidth="40.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<FlowPane prefHeight="150.0" prefWidth="13.0" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
</children>
|
</children>
|
||||||
@ -353,14 +353,14 @@
|
|||||||
<children>
|
<children>
|
||||||
<StackPane HBox.hgrow="NEVER">
|
<StackPane HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="150.0" fitWidth="98.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<FlowPane prefHeight="150.0" prefWidth="64.0" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<StackPane HBox.hgrow="NEVER">
|
<StackPane HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="150.0" fitWidth="93.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<FlowPane prefHeight="150.0" prefWidth="69.0" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
</children>
|
</children>
|
||||||
@ -370,16 +370,16 @@
|
|||||||
</HBox>
|
</HBox>
|
||||||
<HBox alignment="TOP_CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="2">
|
<HBox alignment="TOP_CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="2">
|
||||||
<children>
|
<children>
|
||||||
<StackPane HBox.hgrow="NEVER">
|
<StackPane maxHeight="360.0" HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="150.0" fitWidth="111.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<FlowPane prefHeight="150.0" prefWidth="81.0" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<StackPane HBox.hgrow="NEVER">
|
<StackPane maxHeight="360.0" HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<FlowPane prefHeight="150.0" prefWidth="113.0" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
</children>
|
</children>
|
||||||
|
@ -339,10 +339,5 @@ public class GestionnaireJeu {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
waitPlateau();
|
waitPlateau();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -453,11 +453,12 @@ public class Plateau extends Thread{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Joueur choisirParmisTous(Joueur joueur) {
|
public Joueur choisirParmisTous(Joueur joueur) {
|
||||||
List<Joueur> joueurs = this.getJoueurs();
|
List<Joueur> joueurs = new ArrayList<Joueur>();
|
||||||
|
joueurs.addAll(this.getJoueurs());
|
||||||
|
joueurs.remove(joueur);
|
||||||
return (Joueur) gj.choisir(joueur, joueurs, Joueur.class);
|
return (Joueur) gj.choisir(joueur, joueurs, Joueur.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updateVieJoueur(Joueur joueur, int damage) {
|
public void updateVieJoueur(Joueur joueur, int damage) {
|
||||||
gj.updateVieJoueur(joueur,damage);
|
gj.updateVieJoueur(joueur,damage);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user