Merge branch 'development' of https://github.com/PTE-SH/ShadowHunterGame into development
This commit is contained in:
@ -6,12 +6,19 @@ import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import carte.CarteEquipement;
|
||||
import javafx.animation.KeyFrame;
|
||||
import javafx.animation.Timeline;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.util.Duration;
|
||||
import main.Contexte;
|
||||
import main.GestionnaireJeu;
|
||||
import main.Joueur;
|
||||
import main.JoueurVirtuel;
|
||||
|
||||
public class ChoisirEquipement implements Initializable{
|
||||
@FXML private GridPane grilleEquipement;
|
||||
@ -63,7 +70,6 @@ public class ChoisirEquipement implements Initializable{
|
||||
iv.setFitHeight(100);
|
||||
iv.setFitHeight(100);
|
||||
iv.setPreserveRatio(true);
|
||||
|
||||
hbox.getChildren().add(iv);
|
||||
iv.setOnMouseClicked(e -> {
|
||||
equipementSelected = ce;
|
||||
@ -71,4 +77,15 @@ public class ChoisirEquipement implements Initializable{
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void fireBtnIA(JoueurVirtuel jIA, Contexte c) {
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
|
||||
equipementSelected = jIA.choisirEquipement(equipements);
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
}));
|
||||
timeline.play();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -120,6 +120,9 @@ public class ChoisirJoueur implements Initializable {
|
||||
case CHOISIR_VISION:
|
||||
titre.setText("Choisissez le joueur à qui passer la carte vision!");
|
||||
break;
|
||||
case VOLER_EQUIP:
|
||||
titre.setText("Choisissez le joueur à qui voler un equipement!");
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
59
src/ihm/controller/FinDePartieControlleur.java
Normal file
59
src/ihm/controller/FinDePartieControlleur.java
Normal file
@ -0,0 +1,59 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.Pane;
|
||||
import main.Joueur;
|
||||
|
||||
public class FinDePartieControlleur implements Initializable {
|
||||
|
||||
@FXML private Pane rootPane;
|
||||
@FXML private Label labelWinner;
|
||||
|
||||
public static List<Joueur> listeWinner = new ArrayList<Joueur>();
|
||||
|
||||
/* Pour faire des tests
|
||||
private Joueur j1 = new Joueur("j1");
|
||||
private Joueur j2 = new Joueur("j2");
|
||||
private Joueur j3 = new Joueur("j3");
|
||||
*/
|
||||
String names;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
/*
|
||||
listeWinner.add(j1);
|
||||
listeWinner.add(j2);
|
||||
listeWinner.add(j3);
|
||||
*/
|
||||
|
||||
for (Joueur winner : listeWinner) {
|
||||
if(names != null) {
|
||||
names = names +"\n" + winner.getNom();
|
||||
}
|
||||
else {
|
||||
names = winner.getNom();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
labelWinner.setText(names);
|
||||
}
|
||||
|
||||
public List<Joueur> getListeWinner() {
|
||||
return listeWinner;
|
||||
}
|
||||
|
||||
public void setListeWinner(List<Joueur> listeWinner) {
|
||||
FinDePartieControlleur.listeWinner = listeWinner;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import carte.CarteEquipement;
|
||||
import database.RessourceLoader;
|
||||
import ihm.EffetSonore;
|
||||
import ihm.ImageViewEquipement;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.Node;
|
||||
@ -77,6 +79,10 @@ public class JoueurIHM {
|
||||
}
|
||||
|
||||
private void actionReveler(Button btn) {
|
||||
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
ImageView iv = this.getCartePersonnage();
|
||||
System.out.println(this.joueur.getCartePersonnage());
|
||||
Image im = this.pc.getImageCarte(this.joueur.getCartePersonnage());
|
||||
@ -106,7 +112,6 @@ public class JoueurIHM {
|
||||
iv.fitHeightProperty().bind(gp.heightProperty());
|
||||
iv.fitHeightProperty().bind(gp.heightProperty());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
iv.setOnMouseReleased(release -> {
|
||||
@ -141,6 +146,9 @@ public class JoueurIHM {
|
||||
|
||||
private void utiliserCapacite() {
|
||||
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
AnchorPane save = getZoneJoueur();
|
||||
joueur.utiliserCapacite();
|
||||
Pane pane = null;
|
||||
|
@ -2,6 +2,7 @@ package ihm.controller;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import effet.action.Action;
|
||||
import ihm.Die;
|
||||
import ihm.DieImages;
|
||||
import javafx.animation.KeyFrame;
|
||||
@ -27,17 +28,28 @@ public class LancerDes {
|
||||
private Contexte contexte;
|
||||
private int typeDe;
|
||||
private int[] rolls;
|
||||
|
||||
|
||||
private final static int LANCER_DE_4 = 0;
|
||||
private final static int LANCER_DE_6 = 1;
|
||||
private final static int LANCER_DES = 2;
|
||||
|
||||
public LancerDes(int typeDe, int[] rolls, Contexte c){
|
||||
|
||||
public LancerDes(int typeDe, int[] rolls, Contexte c) {
|
||||
this.typeDe = typeDe;
|
||||
this.rolls = rolls;
|
||||
this.contexte = c;
|
||||
}
|
||||
|
||||
|
||||
private Button interpret(String s) {
|
||||
|
||||
String styles = "-fx-border-color: #e2e2e2;" + "-fx-border-width: 2;" + "-fx-background-radius: 0;"
|
||||
+ "-fx-background-color: #1d1d1d;" + "-fx-text-fill: #d8d8d8;"
|
||||
+ "-fx-background-insets: 0 0 0 0, 0, 1, 2;";
|
||||
|
||||
Button b = new Button(s);
|
||||
b.setStyle(styles);
|
||||
return b;
|
||||
}
|
||||
|
||||
public VBox initLancer(Joueur joueur) {
|
||||
switch (typeDe) {
|
||||
case LANCER_DE_4:
|
||||
@ -46,11 +58,10 @@ public class LancerDes {
|
||||
return initLancerD6(joueur);
|
||||
case LANCER_DES:
|
||||
return initLancerBoth(joueur);
|
||||
default :
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private VBox initLancerD4(Joueur j) {
|
||||
DieImages images = new DieImages(4);
|
||||
@ -58,43 +69,39 @@ public class LancerDes {
|
||||
ImageView stackpane = die.getdieFace();
|
||||
stackpane.setFitHeight(100);
|
||||
stackpane.setFitWidth(100);
|
||||
Button btn = new Button();
|
||||
Button btn = interpret("Lancer dé");
|
||||
Text txt = new Text("Lancez le dé");
|
||||
txt.setFont(Font.font(null, null, null, 12));
|
||||
txt.setFill(Color.WHITE);
|
||||
btn.setText("Lancer dé");
|
||||
txt.setFont(Font.font(null, null, null, 12));
|
||||
txt.setFill(Color.WHITE);
|
||||
btn.setOnAction((ActionEvent event) -> {
|
||||
btn.setDisable(true);// Disable Button
|
||||
Random random = new Random();
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(0.1), (actionEvent) -> {
|
||||
int tempRandom = random.nextInt(4)+1;
|
||||
int tempRandom = random.nextInt(4) + 1;
|
||||
die.setDieFace(tempRandom);
|
||||
}));
|
||||
|
||||
|
||||
timeline.setCycleCount(20);
|
||||
timeline.play();
|
||||
timeline.setOnFinished(actionEvent -> {
|
||||
|
||||
|
||||
die.setDieFace(rolls[0]);
|
||||
txt.setText("Vous avez obtenu "+rolls[0]);
|
||||
Timeline timeline2 = new Timeline(new KeyFrame(
|
||||
Duration.millis(2000),
|
||||
ae -> {
|
||||
|
||||
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
}));
|
||||
timeline2.play();
|
||||
txt.setText("Vous avez obtenu " + rolls[0]);
|
||||
Timeline timeline2 = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
|
||||
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
}));
|
||||
timeline2.play();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
HBox des = new HBox(stackpane);
|
||||
des.setAlignment(Pos.CENTER);
|
||||
VBox root = new VBox(txt,des, new StackPane(btn));
|
||||
VBox root = new VBox(txt, des, new StackPane(btn));
|
||||
root.setAlignment(Pos.CENTER);
|
||||
root.setSpacing(20);
|
||||
if(j instanceof JoueurVirtuel)
|
||||
btn.fire();
|
||||
if (j instanceof JoueurVirtuel)
|
||||
btn.fire();
|
||||
return root;
|
||||
}
|
||||
|
||||
@ -104,44 +111,41 @@ public class LancerDes {
|
||||
ImageView stackpane = die.getdieFace();
|
||||
stackpane.setFitHeight(100);
|
||||
stackpane.setFitWidth(100);
|
||||
Button btn = new Button();
|
||||
Button btn = interpret("Lancer dé");
|
||||
Text txt = new Text("Lancez le dé");
|
||||
txt.setFont(Font.font(null, null, null, 12));
|
||||
txt.setFill(Color.WHITE);
|
||||
btn.setText("Lancer dé");
|
||||
txt.setFont(Font.font(null, null, null, 12));
|
||||
txt.setFill(Color.WHITE);
|
||||
btn.setOnAction((ActionEvent event) -> {
|
||||
btn.setDisable(true);// Disable Button
|
||||
Random random = new Random();
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(.1), (actionEvent) -> {
|
||||
int tempRandom = random.nextInt(6)+1;
|
||||
int tempRandom = random.nextInt(6) + 1;
|
||||
die.setDieFace(tempRandom);
|
||||
}));
|
||||
|
||||
|
||||
timeline.setCycleCount(20);
|
||||
timeline.play();
|
||||
timeline.setOnFinished(actionEvent -> {
|
||||
|
||||
|
||||
die.setDieFace(rolls[0]);
|
||||
txt.setText("Vous avez obtenu "+rolls[0]);
|
||||
Timeline timeline2 = new Timeline(new KeyFrame(
|
||||
Duration.millis(2000),
|
||||
ae -> {
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
}));
|
||||
timeline2.play();
|
||||
txt.setText("Vous avez obtenu " + rolls[0]);
|
||||
Timeline timeline2 = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
}));
|
||||
timeline2.play();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
HBox des = new HBox(stackpane);
|
||||
des.setAlignment(Pos.CENTER);
|
||||
VBox root = new VBox(txt,des, new StackPane(btn));
|
||||
VBox root = new VBox(txt, des, new StackPane(btn));
|
||||
root.setAlignment(Pos.CENTER);
|
||||
root.setSpacing(20);
|
||||
if(j instanceof JoueurVirtuel)
|
||||
if (j instanceof JoueurVirtuel)
|
||||
btn.fire();
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
private VBox initLancerBoth(Joueur j) {
|
||||
DieImages images = new DieImages(6);
|
||||
DieImages images2 = new DieImages(4);
|
||||
@ -153,49 +157,46 @@ public class LancerDes {
|
||||
stackpane2.setFitHeight(100);
|
||||
stackpane.setFitWidth(100);
|
||||
stackpane2.setFitWidth(100);
|
||||
Button btn = new Button();
|
||||
Button btn = interpret("Lancer dés");
|
||||
Text txt = new Text("Lancez les dés");
|
||||
txt.setFont(Font.font(null, null, null, 12));
|
||||
txt.setFill(Color.WHITE);
|
||||
btn.setText("Lancer dés");
|
||||
txt.setFont(Font.font(null, null, null, 12));
|
||||
txt.setFill(Color.WHITE);
|
||||
btn.setOnAction((ActionEvent event) -> {
|
||||
btn.setDisable(true);// Disable Button
|
||||
Random random = new Random();
|
||||
|
||||
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(.1), (actionEvent) -> {
|
||||
int tempRandom = random.nextInt(6)+1;
|
||||
int tempRandom2 = random.nextInt(4)+1;
|
||||
int tempRandom = random.nextInt(6) + 1;
|
||||
int tempRandom2 = random.nextInt(4) + 1;
|
||||
die.setDieFace(tempRandom);
|
||||
die2.setDieFace(tempRandom2);
|
||||
}));
|
||||
|
||||
|
||||
timeline.setCycleCount(20);
|
||||
timeline.play();
|
||||
timeline.setOnFinished(actionEvent -> {
|
||||
|
||||
|
||||
die.setDieFace(rolls[1]);
|
||||
die2.setDieFace(rolls[0]);
|
||||
|
||||
int result = rolls[0]+rolls[1];
|
||||
|
||||
txt.setText("Vous avez obtenu "+result);
|
||||
Timeline timeline2 = new Timeline(new KeyFrame(
|
||||
Duration.millis(2000),
|
||||
ae -> {
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
|
||||
}));
|
||||
timeline2.play();
|
||||
|
||||
int result = rolls[0] + rolls[1];
|
||||
|
||||
txt.setText("Vous avez obtenu " + result);
|
||||
Timeline timeline2 = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
|
||||
}));
|
||||
timeline2.play();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
HBox des = new HBox(stackpane, stackpane2);
|
||||
des.setAlignment(Pos.CENTER);
|
||||
VBox root = new VBox(txt,des, new StackPane(btn));
|
||||
VBox root = new VBox(txt, des, new StackPane(btn));
|
||||
root.setAlignment(Pos.CENTER);
|
||||
root.setSpacing(20);
|
||||
if(j instanceof JoueurVirtuel)
|
||||
if (j instanceof JoueurVirtuel)
|
||||
btn.fire();
|
||||
return root;
|
||||
}
|
||||
|
@ -66,6 +66,10 @@ public class MenuController implements Initializable{
|
||||
}
|
||||
@FXML
|
||||
public void quitterLappli(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class MenuJoueurController implements Initializable{
|
||||
public void changeZoneToScrollPaneJoueur(MouseEvent me) throws IOException {
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/ScrollPaneJoueur.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
AnchorPane bp = fxmlLoader.load();
|
||||
ImageView iv = ((ImageView)me.getSource());
|
||||
|
@ -22,7 +22,7 @@ public class PiocherVisionController implements Initializable{
|
||||
public void voirCarte(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_donner_vision.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package ihm.controller;
|
||||
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
@ -27,6 +26,7 @@ import javafx.animation.Timeline;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Group;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.control.Button;
|
||||
@ -49,13 +49,16 @@ import main.Joueur;
|
||||
import main.JoueurVirtuel;
|
||||
|
||||
public class PlateauController implements Initializable {
|
||||
|
||||
|
||||
private List<Joueur> listJoueur = new ArrayList<Joueur>();
|
||||
private List<JoueurIHM> joueursIHM;
|
||||
|
||||
@FXML private AnchorPane rootPane;
|
||||
@FXML private GridPane gridPaneVie;
|
||||
@FXML public GridPane gridPaneLieux;
|
||||
|
||||
@FXML
|
||||
private AnchorPane rootPane;
|
||||
@FXML
|
||||
private GridPane gridPaneVie;
|
||||
@FXML
|
||||
public GridPane gridPaneLieux;
|
||||
|
||||
private ChoisirBoolean cb;
|
||||
private ChoisirEquipement ce;
|
||||
@ -63,130 +66,128 @@ public class PlateauController implements Initializable {
|
||||
private PiocherCarte pc;
|
||||
private LancerDes ld;
|
||||
|
||||
private static Map<Carte,BufferedImage> mapRessourcesCartes;
|
||||
private static Map<String,BufferedImage> mapRessourcesDosCartes;
|
||||
|
||||
private static Map<Carte, BufferedImage> mapRessourcesCartes;
|
||||
private static Map<String, BufferedImage> mapRessourcesDosCartes;
|
||||
|
||||
public static int DICE_SIX = 1;
|
||||
public static int DICE_QUATRE = 0;
|
||||
public static int DICE_BOTH = 2;
|
||||
|
||||
private final double RES = 200./2250.;
|
||||
|
||||
private final double RES = 200. / 2250.;
|
||||
private ResourceBundle resourceBundle;
|
||||
|
||||
|
||||
/**
|
||||
* initialise les données du plateau
|
||||
*/
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
//System.out.println("Création du plateau ...");
|
||||
|
||||
// System.out.println("Création du plateau ...");
|
||||
|
||||
this.resourceBundle = arg1;
|
||||
this.joueursIHM = new ArrayList<JoueurIHM>();
|
||||
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
|
||||
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
|
||||
RessourceLoader rl = gj.getRessourceLoader();
|
||||
|
||||
|
||||
Map<Integer, Joueur> map = gj.getMapJoueurs();
|
||||
|
||||
for(int i = 0 ; i < gridPaneVie.getChildren().size();i++) {
|
||||
|
||||
|
||||
for (int i = 0; i < gridPaneVie.getChildren().size(); i++) {
|
||||
|
||||
Pane p = (Pane) gridPaneVie.getChildren().get(i);
|
||||
Label l = (Label) p.getChildren().get(1);
|
||||
l.setText(i+"");
|
||||
|
||||
l.setText(i + "");
|
||||
|
||||
}
|
||||
|
||||
for(int i : map.keySet()) {
|
||||
|
||||
for (int i : map.keySet()) {
|
||||
System.out.println(i);
|
||||
joueursIHM.add(new JoueurIHM(i,map.get(i),getPaneJoueur(i),new Color(Math.random(), Math.random(), Math.random(),1),gridPaneVie, gridPaneLieux,this));
|
||||
joueursIHM.add(new JoueurIHM(i, map.get(i), getPaneJoueur(i),
|
||||
new Color(Math.random(), Math.random(), Math.random(), 1), gridPaneVie, gridPaneLieux, this));
|
||||
}
|
||||
|
||||
for(int i = 0; i<joueursIHM.size(); i++) {
|
||||
|
||||
for (int i = 0; i < joueursIHM.size(); i++) {
|
||||
joueursIHM.get(i).deplacerPionVie(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
mapRessourcesCartes = rl.getRessourceCartes();
|
||||
setMapRessourcesDosCartes(rl.getRessourceDosCartes());
|
||||
|
||||
setMapRessourcesDosCartes(rl.getRessourceDosCartes());
|
||||
|
||||
List<CarteLieu> cl = gj.getCartesLieux();
|
||||
List<ImageView> ivs = this.getLieux();
|
||||
|
||||
applyImages(cl,ivs);
|
||||
|
||||
applyImages(cl, ivs);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void applyImages(List<CarteLieu> cls, List<ImageView> ivs) {
|
||||
|
||||
|
||||
int size = cls.size();
|
||||
if(cls.size() == ivs.size()) {
|
||||
|
||||
for(int i = 0; i < size; i++) {
|
||||
|
||||
if (cls.size() == ivs.size()) {
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
||||
CarteLieu cl = cls.get(i);
|
||||
ImageView iv = ivs.get(i);
|
||||
|
||||
|
||||
BufferedImage bi = mapRessourcesCartes.get(cl);
|
||||
Image image = RessourceLoader.toJavaFX(bi);
|
||||
applyImageLieu(iv,image);
|
||||
}
|
||||
}
|
||||
applyImageLieu(iv, image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void applyImageLieu(ImageView iv, Image im) {
|
||||
|
||||
|
||||
iv.setImage(im);
|
||||
Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
|
||||
iv.setFitWidth(RES*screenSize.width);
|
||||
//iv.fitHeightProperty().bind(sp.heightProperty());
|
||||
//iv.fitWidthProperty().bind(sp.widthProperty());
|
||||
|
||||
iv.setFitWidth(RES * screenSize.width);
|
||||
// iv.fitHeightProperty().bind(sp.heightProperty());
|
||||
// iv.fitWidthProperty().bind(sp.widthProperty());
|
||||
|
||||
iv.setPreserveRatio(true);
|
||||
//iv.fitWidthProperty().bind(sp.widthProperty());
|
||||
// iv.fitWidthProperty().bind(sp.widthProperty());
|
||||
}
|
||||
|
||||
private Pane getPaneJoueur(int i) {
|
||||
|
||||
System.out.println("i "+i);
|
||||
int position = i%8;
|
||||
HBox hb = (HBox) rootPane.getChildren().get(0);
|
||||
private Pane getPaneJoueur(int i) {
|
||||
|
||||
System.out.println("i " + i);
|
||||
int position = i % 8;
|
||||
HBox hb = (HBox) rootPane.getChildren().get(0);
|
||||
GridPane gp = null;
|
||||
|
||||
|
||||
// BAS
|
||||
if(position < 2) {
|
||||
if (position < 2) {
|
||||
VBox group = (VBox) hb.getChildren().get(1);
|
||||
gp = (GridPane) group.getChildren().get(2);
|
||||
|
||||
//DROITE
|
||||
}else if(position < 4) {
|
||||
System.out.println("Oui");
|
||||
Group group = (Group) hb.getChildren().get(2);
|
||||
gp = (GridPane) group.getChildren().get(0);
|
||||
|
||||
//HAUT
|
||||
}else if(position < 6) {
|
||||
|
||||
|
||||
// DROITE
|
||||
} else if (position < 4) {
|
||||
System.out.println("Oui");
|
||||
Group group = (Group) hb.getChildren().get(2);
|
||||
gp = (GridPane) group.getChildren().get(0);
|
||||
|
||||
// HAUT
|
||||
} else if (position < 6) {
|
||||
|
||||
VBox group = (VBox) hb.getChildren().get(1);
|
||||
gp = (GridPane) group.getChildren().get(0);
|
||||
|
||||
//GAUCHE
|
||||
}else if(position < 8) {
|
||||
|
||||
// GAUCHE
|
||||
} else if (position < 8) {
|
||||
Group group = (Group) hb.getChildren().get(0);
|
||||
gp = (GridPane) group.getChildren().get(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return (Pane) gp.getChildren().get(i%2);
|
||||
|
||||
return (Pane) gp.getChildren().get(i % 2);
|
||||
}
|
||||
|
||||
|
||||
private List<ImageView> getLieux() {
|
||||
|
||||
|
||||
List<ImageView> views = new ArrayList<ImageView>();
|
||||
for(int i = 0 ; i < gridPaneLieux.getChildren().size(); i++) {
|
||||
|
||||
for (int i = 0; i < gridPaneLieux.getChildren().size(); i++) {
|
||||
|
||||
HBox p = (HBox) gridPaneLieux.getChildren().get(i);
|
||||
for(int j = 0; j < p.getChildren().size(); j++) {
|
||||
for (int j = 0; j < p.getChildren().size(); j++) {
|
||||
StackPane sp = (StackPane) p.getChildren().get(j);
|
||||
ImageView iv = (ImageView) sp.getChildren().get(0);
|
||||
views.add(iv);
|
||||
@ -194,7 +195,7 @@ public class PlateauController implements Initializable {
|
||||
}
|
||||
return views;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Affiche aux yeux de tous la carte personnage du joueur
|
||||
*
|
||||
@ -203,28 +204,26 @@ public class PlateauController implements Initializable {
|
||||
public void seReveler(int numJoueur) throws IOException {
|
||||
System.out.println(listJoueur.get(numJoueur).getNom() + " se revele");
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Reveler_son_identite.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Parent root = fxmlLoader.load();
|
||||
|
||||
RevelationController rc = fxmlLoader.getController();
|
||||
rc.showInformation(listJoueur.get(numJoueur));
|
||||
|
||||
|
||||
RevelationController rc = fxmlLoader.getController();
|
||||
rc.showInformation(listJoueur.get(numJoueur));
|
||||
|
||||
PopUp popup = new PopUp(root, "Consulter sa carte");
|
||||
popup.display();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public JoueurIHM getJoueurIHM(Joueur j) {
|
||||
|
||||
for(JoueurIHM joueurIHM : joueursIHM) {
|
||||
if(joueurIHM.getJoueur().equals(j)) return joueurIHM;
|
||||
|
||||
for (JoueurIHM joueurIHM : joueursIHM) {
|
||||
if (joueurIHM.getJoueur().equals(j))
|
||||
return joueurIHM;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Permet de consulter sa carte perssonage en cas d'oublie
|
||||
*
|
||||
@ -233,18 +232,17 @@ public class PlateauController implements Initializable {
|
||||
public void consulterSaCarte(int numJoueur) throws IOException {
|
||||
System.out.println(listJoueur.get(numJoueur).getNom() + " consulte sa carte");
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/afficher_carte_perso.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Parent root = fxmlLoader.load();
|
||||
|
||||
|
||||
AfficherCarteController acc = fxmlLoader.getController();
|
||||
acc.showInformation(listJoueur.get(numJoueur));
|
||||
|
||||
|
||||
AfficherCarteController acc = fxmlLoader.getController();
|
||||
acc.showInformation(listJoueur.get(numJoueur));
|
||||
|
||||
PopUp popup = new PopUp(root, "Consulter sa carte");
|
||||
popup.display();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Place les joueurs au bon endroit sur le plateau
|
||||
*
|
||||
@ -252,164 +250,174 @@ public class PlateauController implements Initializable {
|
||||
*/
|
||||
public void placerJoueurs(Map<Integer, Joueur> j) {
|
||||
Set<Integer> set = j.keySet();
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
if(!set.contains(i)) {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (!set.contains(i)) {
|
||||
getPaneJoueur(i).getChildren().setAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void rollDice(Joueur joueur, int typeDice, int[] rolls, Contexte c) {
|
||||
|
||||
this.ld=new LancerDes(typeDice,rolls,c);
|
||||
|
||||
this.ld = new LancerDes(typeDice, rolls, c);
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
jihm.setZoneJoueur(ld.initLancer(joueur));
|
||||
}
|
||||
|
||||
public void afficherChoisir(Joueur j, Contexte contexte) throws IOException {
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/choisirBoolean.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
this.cb = fxmlLoader.getController();
|
||||
cb.setTitre(contexte);
|
||||
if(j instanceof JoueurVirtuel) {
|
||||
switch(contexte) {
|
||||
case ACTIVER_EFFET_LIEU :
|
||||
if (j instanceof JoueurVirtuel) {
|
||||
switch (contexte) {
|
||||
case ACTIVER_EFFET_LIEU:
|
||||
cb.fireBtnIAEffetLieu();
|
||||
break;
|
||||
case ATTAQUER :
|
||||
cb.fireBtnIAattaquer((JoueurVirtuel)j, j.getJoueursRange());
|
||||
case ATTAQUER:
|
||||
cb.fireBtnIAattaquer((JoueurVirtuel) j, j.getJoueursRange());
|
||||
break;
|
||||
case CHOISIR_VISION :
|
||||
cb.fireBtnIAVision();;
|
||||
case CHOISIR_VISION:
|
||||
cb.fireBtnIAVision();
|
||||
;
|
||||
break;
|
||||
}
|
||||
}
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
}
|
||||
|
||||
|
||||
public void afficherChoisirEquipementVole(Joueur j, List<CarteEquipement> lce) throws IOException {
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Jouer_tour(2a)voler_equipement.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
this.ce = fxmlLoader.getController();
|
||||
this.ce.setListCarteEquipements(lce);
|
||||
this.ce.initChoisirEquipement();
|
||||
if (j instanceof JoueurVirtuel)
|
||||
this.ce.fireBtnIA((JoueurVirtuel) j, Contexte.VOLER_EQUIP);
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
}
|
||||
|
||||
public void afficherAlterationVie(Joueur j, int valeur) throws IOException, InterruptedException {
|
||||
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/AlterationVieZJ.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
AlterationVieZJ avzj = fxmlLoader.getController();
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
AlterationVieZJ avzj = fxmlLoader.getController();
|
||||
avzj.changeLabel(valeur);
|
||||
|
||||
|
||||
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
Pane p = (Pane) jihm.getZoneJoueur();
|
||||
Pane pane = new Pane();
|
||||
|
||||
if(p.getChildren() != null && p.getChildren().size() > 0) {
|
||||
|
||||
|
||||
if (p.getChildren() != null && p.getChildren().size() > 0) {
|
||||
|
||||
pane = (Pane) p.getChildren().get(0);
|
||||
}
|
||||
|
||||
|
||||
jihm.setZoneJoueur(root);
|
||||
Pane pp = pane;
|
||||
Timeline timeline = new Timeline(new KeyFrame(
|
||||
Duration.millis(1000),
|
||||
ae -> {
|
||||
|
||||
jihm.resetZoneJoueur();
|
||||
jihm.setZoneJoueur(pp);
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(1000), ae -> {
|
||||
|
||||
jihm.resetZoneJoueur();
|
||||
jihm.setZoneJoueur(pp);
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
|
||||
|
||||
public void afficherLieu(Joueur j) throws IOException {
|
||||
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/LieuZJ.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
LieuZJ lzj = fxmlLoader.getController();
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
LieuZJ lzj = fxmlLoader.getController();
|
||||
lzj.setImageView(this.getImageCarte(j.getCarteLieu()));
|
||||
if(j instanceof JoueurVirtuel) lzj.fireBtnIA();
|
||||
if (j instanceof JoueurVirtuel)
|
||||
lzj.fireBtnIA();
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
if(jihm.getPosition()==4 || jihm.getPosition()==5) {
|
||||
SplitPane s=(SplitPane)root.getChildren().get(0);
|
||||
AnchorPane a=(AnchorPane)s.getItems().get(0);
|
||||
VBox v= (VBox)a.getChildren().get(0);
|
||||
AnchorPane b=(AnchorPane)s.getItems().get(1);
|
||||
ImageView i= (ImageView)b.getChildren().get(0);
|
||||
if (jihm.getPosition() == 4 || jihm.getPosition() == 5) {
|
||||
SplitPane s = (SplitPane) root.getChildren().get(0);
|
||||
AnchorPane a = (AnchorPane) s.getItems().get(0);
|
||||
VBox v = (VBox) a.getChildren().get(0);
|
||||
AnchorPane b = (AnchorPane) s.getItems().get(1);
|
||||
ImageView i = (ImageView) b.getChildren().get(0);
|
||||
|
||||
v.setRotate(180);
|
||||
i.setRotate(180);
|
||||
s.setRotate(180);
|
||||
}
|
||||
|
||||
|
||||
jihm.setZoneJoueur(root);
|
||||
}
|
||||
|
||||
public void afficherChoisirJoueur(Joueur j, List<Joueur> joueurs, Contexte contexte) throws IOException {
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/choixJoueurAttq.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
|
||||
List<JoueurIHM> joueursIHM = toJoueursIHM(joueurs);
|
||||
|
||||
|
||||
this.cj = fxmlLoader.getController();
|
||||
cj.setTitre(contexte);
|
||||
this.cj.setListJoueursIHM(joueursIHM);
|
||||
this.cj.initButtons();
|
||||
if(j instanceof JoueurVirtuel)
|
||||
cj.fireBtnIA((JoueurVirtuel)j, contexte);
|
||||
if (j instanceof JoueurVirtuel)
|
||||
cj.fireBtnIA((JoueurVirtuel) j, contexte);
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
}
|
||||
private List<JoueurIHM> toJoueursIHM(List<Joueur> joueurs) {
|
||||
|
||||
List<JoueurIHM> list = new ArrayList<JoueurIHM>();
|
||||
|
||||
for(Joueur j : joueurs) {
|
||||
list.add(getJoueurIHM(j));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private List<JoueurIHM> toJoueursIHM(List<Joueur> joueurs) {
|
||||
|
||||
List<JoueurIHM> list = new ArrayList<JoueurIHM>();
|
||||
|
||||
for (Joueur j : joueurs) {
|
||||
list.add(getJoueurIHM(j));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public void afficherPiocher(Joueur j) throws IOException {
|
||||
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Jouer_tour(2b)piocher_carte.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
//CartePiochable lzj = fxmlLoader.getController();
|
||||
//lzj.setImageView(this.getImageCarte(j.getCarteLieu()));
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
}
|
||||
public void afficherEffet(Joueur j) throws IOException {
|
||||
|
||||
public void afficherEffet(Joueur j) throws IOException {
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Jouer_tour(2b)piocher_carte.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
}
|
||||
|
||||
public void afficherFinDePartie(List<Joueur> listeJoueursGagnants) throws IOException {
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Fin_De_Partie.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
//CartePiochable lzj = fxmlLoader.getController();
|
||||
//lzj.setImageView(this.getImageCarte(j.getCarteLieu()));
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
|
||||
FinDePartieControlleur.listeWinner = listeJoueursGagnants;
|
||||
}
|
||||
|
||||
public CarteEquipement getChoixEquipementVole(Joueur joueur) {
|
||||
@ -419,187 +427,199 @@ public void afficherEffet(Joueur j) throws IOException {
|
||||
jihm.getZoneJoueur().getChildren().setAll();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public boolean getChoix(Joueur joueur) {
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
boolean result = this.cb.getResult();
|
||||
this.cb = null;
|
||||
jihm.getZoneJoueur().getChildren().setAll();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Joueur getChoixJoueur(Joueur joueur) {
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
JoueurIHM result = this.cj.getJoueurSelected();
|
||||
this.cj = null;
|
||||
jihm.getZoneJoueur().getChildren().setAll();
|
||||
return result.getJoueur();
|
||||
JoueurIHM result = this.cj.getJoueurSelected();
|
||||
this.cj = null;
|
||||
jihm.getZoneJoueur().getChildren().setAll();
|
||||
return result.getJoueur();
|
||||
}
|
||||
public Type getChoixCarte(Joueur joueur) {
|
||||
|
||||
public Type getChoixCarte(Joueur joueur) {
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
Type result = this.pc.getCarte();
|
||||
this.pc = null;
|
||||
jihm.getZoneJoueur().getChildren().setAll();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public void deplacer(Joueur currentJoueur) {
|
||||
JoueurIHM jIHM = getJoueurIHM(currentJoueur);
|
||||
jIHM.replacerPionLieu();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void updateVieJoueur(Joueur joueur, int damage) {
|
||||
JoueurIHM jIHM = getJoueurIHM(joueur);
|
||||
jIHM.getZoneJoueur().getChildren().setAll();
|
||||
jIHM.deplacerPionVie(damage);
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
public void mettreEnPause(MouseEvent me) throws IOException {
|
||||
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
|
||||
System.out.println("Jeu en pause ...");
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Pause.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
|
||||
PopUp pu = new PopUp(root, "Pause");
|
||||
pu.display();
|
||||
}
|
||||
|
||||
|
||||
public static Image getImageCarte(Carte carte) {
|
||||
BufferedImage bi = mapRessourcesCartes.get(carte);
|
||||
return RessourceLoader.toJavaFX(bi);
|
||||
}
|
||||
|
||||
|
||||
public static Image getImageDosCarte(String s) {
|
||||
BufferedImage bi = mapRessourcesDosCartes.get(s);
|
||||
return RessourceLoader.toJavaFX(bi);
|
||||
}
|
||||
|
||||
|
||||
public void ajouterEquipement(Joueur j, CarteEquipement e) {
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.ajouterEquipement(e);
|
||||
}
|
||||
|
||||
|
||||
public void retirerEquipement(Joueur j, CarteEquipement e) {
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.retirerEquipement(e);
|
||||
}
|
||||
|
||||
|
||||
public void close() throws IOException {
|
||||
final URL fxmlURL = PlateauController.class.getResource("/ihm/ressources/Menu.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
rootPane.getChildren().setAll(pane);
|
||||
rootPane.getChildren().setAll(pane);
|
||||
}
|
||||
|
||||
public void afficherLT(Joueur j, CartePiochable cartePiochable) throws IOException {
|
||||
|
||||
|
||||
Image i = getImageCarte(cartePiochable);
|
||||
ImageView iv = new ImageView(i);
|
||||
Pane p = new Pane(iv);
|
||||
PopUp pu = new PopUp(p,"Image");
|
||||
pu.getStage().focusedProperty().addListener((obs,wasFocused,isNowFocused) -> {
|
||||
if(!isNowFocused) {
|
||||
PopUp pu = new PopUp(p, "Image");
|
||||
pu.getStage().focusedProperty().addListener((obs, wasFocused, isNowFocused) -> {
|
||||
if (!isNowFocused) {
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
pu.getStage().hide();
|
||||
}
|
||||
});
|
||||
if(j instanceof JoueurVirtuel) {
|
||||
});
|
||||
if (j instanceof JoueurVirtuel) {
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(3000), ae -> {
|
||||
pu.getStage().hide();
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
}
|
||||
pu.display();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void afficherVision(Joueur j, CartePiochable cartePiochable) throws IOException {
|
||||
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/RecevoirCarte.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
RecevoirCarte lzj = fxmlLoader.getController();
|
||||
Pane root = (Pane) fxmlLoader.load();
|
||||
RecevoirCarte lzj = fxmlLoader.getController();
|
||||
Image im = getImageCarte(cartePiochable);
|
||||
lzj.setImageView(im);
|
||||
lzj.setText("Cachez la carte vision");
|
||||
if(j instanceof JoueurVirtuel) lzj.fireBtnIA();
|
||||
if (j instanceof JoueurVirtuel)
|
||||
lzj.fireBtnIA();
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
|
||||
if(jihm.getPosition()==4 || jihm.getPosition()==5) {
|
||||
SplitPane s=(SplitPane)root.getChildren().get(0);
|
||||
AnchorPane a=(AnchorPane)s.getItems().get(0);
|
||||
VBox v= (VBox)a.getChildren().get(0);
|
||||
AnchorPane b=(AnchorPane)s.getItems().get(1);
|
||||
ImageView i= (ImageView)b.getChildren().get(0);
|
||||
|
||||
|
||||
v.setRotate(180);
|
||||
i.setRotate(180);
|
||||
s.setRotate(180);
|
||||
}
|
||||
jihm.getZoneJoueur();
|
||||
jihm.setZoneJoueur(root);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Map<String,BufferedImage> getMapRessourcesDosCartes() {
|
||||
public Map<String, BufferedImage> getMapRessourcesDosCartes() {
|
||||
|
||||
return mapRessourcesDosCartes;
|
||||
}
|
||||
|
||||
|
||||
public void setMapRessourcesDosCartes(Map<String,BufferedImage> mapRessourcesDosCartes) {
|
||||
public void setMapRessourcesDosCartes(Map<String, BufferedImage> mapRessourcesDosCartes) {
|
||||
this.mapRessourcesDosCartes = mapRessourcesDosCartes;
|
||||
}
|
||||
|
||||
|
||||
private Action choixAction;
|
||||
|
||||
|
||||
public void afficherChoisirAction(Joueur joueur, List<Action> list) {
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/ChoisirAction.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
|
||||
|
||||
List<Button> buttons = new ArrayList<Button>();
|
||||
|
||||
for(Action a : list) {
|
||||
Button button = interpret(a);
|
||||
buttons.add(button);
|
||||
button.setOnAction(x -> {
|
||||
this.choixAction = a;
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
|
||||
for (Action a : list) {
|
||||
Button button = interpret(a);
|
||||
buttons.add(button);
|
||||
button.setOnAction(x -> {
|
||||
|
||||
this.choixAction = a;
|
||||
GestionnaireJeu.notifyPlateau();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
VBox v = new VBox();
|
||||
v.getChildren().addAll(buttons);
|
||||
|
||||
v.setAlignment(Pos.CENTER);
|
||||
v.setSpacing(20.0);
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
jihm.setZoneJoueur(v);
|
||||
|
||||
if (joueur instanceof JoueurVirtuel) {
|
||||
for (Button b : buttons)
|
||||
b.setDisable(true);
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
|
||||
Button bchoisi = ((JoueurVirtuel)joueur).choisirEffet(buttons);
|
||||
bchoisi.setDisable(false);
|
||||
bchoisi.fire();
|
||||
}));
|
||||
timeline.play();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Action getChoixAction(Joueur joueur) {
|
||||
return this.choixAction;
|
||||
}
|
||||
|
||||
|
||||
private Button interpret(Action a) {
|
||||
|
||||
String styles = "-fx-border-color: #e2e2e2;" + "-fx-border-width: 2;" + "-fx-background-radius: 0;"
|
||||
+ "-fx-background-color: #1d1d1d;" + "-fx-text-fill: #d8d8d8;"
|
||||
+ "-fx-background-insets: 0 0 0 0, 0, 1, 2;";
|
||||
|
||||
String s = a.toString();
|
||||
Button b = new Button(s);
|
||||
b.setStyle(styles);
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
public void revealJoueur(Joueur joueur) {
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
jihm.reveler();
|
||||
|
@ -40,7 +40,7 @@ public class PlateauControllerTest implements Initializable {
|
||||
Pane p;
|
||||
try {
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/MenuJoueur.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
|
||||
p = fxmlLoader.load();
|
||||
@ -165,7 +165,7 @@ public class PlateauControllerTest implements Initializable {
|
||||
public boolean choisir(Joueur j) throws IOException {
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/choisirBoolean.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
|
||||
Parent root = fxmlLoader.load();
|
||||
|
@ -209,7 +209,7 @@ public class PlayersController implements Initializable{
|
||||
gj.setConfiguration(new Configuration(this.joueurs));
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/PlateauTest2.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
AnchorPane root = fxmlLoader.load();
|
||||
PlateauController pc = fxmlLoader.getController();
|
||||
@ -263,9 +263,11 @@ public class PlayersController implements Initializable{
|
||||
listeIaLv2.get(indice).setVisible(true);
|
||||
listeIaLv3.get(indice).setVisible(true);
|
||||
|
||||
plus.get(indice).setDisable(true);
|
||||
|
||||
nbJoueursV++;
|
||||
}else {
|
||||
ia.get(indice).setVisible(false);
|
||||
nbJoueursH++;
|
||||
}
|
||||
|
||||
@ -299,7 +301,8 @@ public class PlayersController implements Initializable{
|
||||
nbJoueursH--;
|
||||
}
|
||||
|
||||
|
||||
ia.get(indice).setVisible(true);
|
||||
plus.get(indice).setDisable(false);
|
||||
listeIaLv1.get(indice).setVisible(false);
|
||||
listeIaLv2.get(indice).setVisible(false);
|
||||
listeIaLv3.get(indice).setVisible(false);
|
||||
@ -376,7 +379,7 @@ public class PlayersController implements Initializable{
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
|
@ -100,7 +100,7 @@ public class ReglesControlleur implements Initializable {
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
System.out.println("Retour au Menu");
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
AnchorPane pane = fxmlLoader.load();
|
||||
Scene scene = new Scene(pane);
|
||||
|
@ -29,7 +29,7 @@ public class ScrollPaneJoueurController implements Initializable{
|
||||
public void changeZoneJoueurToMenuJoueur(MouseEvent me) throws IOException {
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/MenuJoueur.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
BorderPane bp = fxmlLoader.load();
|
||||
ImageView iv = ((ImageView)me.getSource());
|
||||
|
@ -461,4 +461,4 @@
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</AnchorPane>
|
40
src/ihm/ressources/Fin_De_Partie.fxml
Normal file
40
src/ihm/ressources/Fin_De_Partie.fxml
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<Pane fx:id="rootPane" styleClass="background" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.FinDePartieControlleur">
|
||||
<children>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="595.0" prefWidth="758.0">
|
||||
<children>
|
||||
<Label alignment="CENTER" contentDisplay="CENTER" prefWidth="346.0" styleClass="titre" text="FIN DE PARTIE">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<padding>
|
||||
<Insets top="50.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label alignment="CENTER" contentDisplay="CENTER" prefHeight="54.0" prefWidth="386.0" styleClass="titre" text="La victoire appartient à:" textAlignment="CENTER">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<VBox.margin>
|
||||
<Insets top="25.0" />
|
||||
</VBox.margin>
|
||||
</Label>
|
||||
<Label fx:id="labelWinner" alignment="CENTER" contentDisplay="CENTER" styleClass="titre" text="(nom des gagnants)" textAlignment="CENTER">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<padding>
|
||||
<Insets top="40.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</Pane>
|
@ -35,7 +35,7 @@
|
||||
<Font size="48.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="btnStop" layoutX="101.0" layoutY="140.0" mnemonicParsing="false" text="Stop">
|
||||
<Button fx:id="btnStop" layoutX="101.0" layoutY="140.0" mnemonicParsing="false" text="%stop">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
|
@ -78,7 +78,7 @@
|
||||
</Button>
|
||||
</children>
|
||||
</HBox>
|
||||
<Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="Choisir un joueur à qui donner la carte vision" />
|
||||
<Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="%choisir.jouer.a.qui.donner.vision" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
|
@ -6,12 +6,11 @@
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||
<children>
|
||||
<Label contentDisplay="CENTER" layoutX="77.0" layoutY="90.0" prefHeight="27.0" prefWidth="102.0" text="Il ne se passe rien." textAlignment="CENTER" />
|
||||
<Label contentDisplay="CENTER" layoutX="77.0" layoutY="90.0" prefHeight="27.0" prefWidth="102.0" text="%se.passe.rien" textAlignment="CENTER" />
|
||||
<HBox alignment="CENTER" layoutY="62.0" prefHeight="21.0" prefWidth="255.0">
|
||||
<children>
|
||||
<Label text="%joueur" />
|
||||
|
@ -11,7 +11,7 @@
|
||||
<children>
|
||||
<Label fx:id="Titre" layoutX="9.0" layoutY="32.0" text="%attaquer.ou.soigner" />
|
||||
<Button fx:id="nonButton" layoutX="142.0" layoutY="119.0" mnemonicParsing="false" text="%se.soigner" />
|
||||
<Button fx:id="ouiButton" layoutX="29.0" layoutY="119.0" mnemonicParsing="false" text="Attaquer !" />
|
||||
<Button fx:id="ouiButton" layoutX="29.0" layoutY="119.0" mnemonicParsing="false" text="%attaquer" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirBoolean">
|
||||
<children>
|
||||
<Button fx:id="nonButton" layoutX="136.0" layoutY="128.0" mnemonicParsing="false" text="Ne pas attaquer" />
|
||||
<Label fx:id="titre" layoutX="40.0" layoutY="31.0" text="Voulez-vous attaquer un joueur ?" />
|
||||
<Button fx:id="ouiButton" layoutX="21.0" layoutY="128.0" mnemonicParsing="false" text="Attaquer !" />
|
||||
<Button fx:id="nonButton" layoutX="136.0" layoutY="128.0" mnemonicParsing="false" text="%ne.pas.attaqur" />
|
||||
<Label fx:id="titre" layoutX="40.0" layoutY="31.0" text="%voulez.vous.attaquer.joueur" />
|
||||
<Button fx:id="ouiButton" layoutX="21.0" layoutY="128.0" mnemonicParsing="false" text="%attaquer" />
|
||||
</children>
|
||||
</Pane>
|
||||
|
@ -78,7 +78,7 @@
|
||||
</Button>
|
||||
</children>
|
||||
</HBox>
|
||||
<Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="Choisir un joueur à attaquer !" />
|
||||
<Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="%choisir.joueur.attaquer" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<Font size="48.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="btnStop" layoutX="105.0" layoutY="144.0" mnemonicParsing="false" text="Stop" />
|
||||
<Button fx:id="btnStop" layoutX="105.0" layoutY="144.0" mnemonicParsing="false" text="%stop" underline="true" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
|
@ -16,12 +16,12 @@
|
||||
<children>
|
||||
<VBox alignment="CENTER" spacing="30.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Label styleClass="text" text="Vous arrivez sur cette Carte Lieu" textOverrun="CLIP" wrapText="true">
|
||||
<Label styleClass="text" text="%arriver.sur.carte.lieux" textOverrun="CLIP" wrapText="true">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="okButton" mnemonicParsing="false" styleClass="bouton" text="Ok" />
|
||||
<Button fx:id="okButton" mnemonicParsing="false" styleClass="bouton" text="%ok" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#quitterLappli" styleClass="bouton" text="Quitter">
|
||||
<Button mnemonicParsing="false" onMouseClicked="#quitterLappli" styleClass="bouton" text="%quitter">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
|
@ -14,21 +14,21 @@
|
||||
<children>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="480.0" prefWidth="640.0">
|
||||
<children>
|
||||
<Label text="Pause">
|
||||
<Label text="%pause">
|
||||
<font>
|
||||
<Font size="48.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<VBox>
|
||||
<children>
|
||||
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="Sons">
|
||||
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="%sons">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<HBox alignment="CENTER_LEFT">
|
||||
<children>
|
||||
<Label text="Musique">
|
||||
<Label text="%musique">
|
||||
<HBox.margin>
|
||||
<Insets right="300.0" />
|
||||
</HBox.margin>
|
||||
@ -61,7 +61,7 @@
|
||||
</Label>
|
||||
<HBox alignment="CENTER_LEFT">
|
||||
<children>
|
||||
<Label text="Effet sonores">
|
||||
<Label text="%effet">
|
||||
<HBox.margin>
|
||||
<Insets right="273.0" />
|
||||
</HBox.margin>
|
||||
@ -77,7 +77,7 @@
|
||||
<Slider fx:id="sliderEffetsPause" blockIncrement="1.0" majorTickUnit="1.0" max="0.0" min="-20.0" minorTickCount="10" onMouseClicked="#slideVolumeEffets" prefHeight="14.0" prefWidth="194.0" />
|
||||
</children>
|
||||
</HBox>
|
||||
<Button fx:id="reglesPause" mnemonicParsing="false" onMouseClicked="#afficherReglePause" text="Règles">
|
||||
<Button fx:id="reglesPause" mnemonicParsing="false" onMouseClicked="#afficherReglePause" text="%regles">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
@ -85,7 +85,7 @@
|
||||
<Insets top="30.0" />
|
||||
</VBox.margin>
|
||||
</Button>
|
||||
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="Jeux">
|
||||
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="%jeux">
|
||||
<VBox.margin>
|
||||
<Insets top="50.0" />
|
||||
</VBox.margin>
|
||||
@ -98,7 +98,7 @@
|
||||
<Insets top="5.0" />
|
||||
</VBox.margin>
|
||||
<children>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#reprendre" text="Reprendre la partie">
|
||||
<Button mnemonicParsing="false" onMouseClicked="#reprendre" text="%reprendre.partie">
|
||||
<HBox.margin>
|
||||
<Insets right="25.0" />
|
||||
</HBox.margin>
|
||||
@ -106,7 +106,7 @@
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#quitter" style="-fx-text-fill: red;" text="Quitter le jeu">
|
||||
<Button mnemonicParsing="false" onMouseClicked="#quitter" style="-fx-text-fill: red;" text="%quitter.jeu">
|
||||
<HBox.margin>
|
||||
<Insets left="25.0" />
|
||||
</HBox.margin>
|
||||
|
@ -76,7 +76,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -124,7 +124,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -193,7 +193,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -241,7 +241,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -672,7 +672,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -720,7 +720,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -786,7 +786,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
@ -834,7 +834,7 @@
|
||||
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
|
@ -16,12 +16,12 @@
|
||||
<children>
|
||||
<VBox alignment="CENTER" spacing="30.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Label fx:id="label" minHeight="0.0" minWidth="0.0" styleClass="text" text="Glissez la barre" textOverrun="CLIP" wrapText="true">
|
||||
<Label fx:id="label" minHeight="0.0" minWidth="0.0" styleClass="text" text="%glisser.barre" textOverrun="CLIP" wrapText="true">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="okButton" minHeight="0.0" minWidth="0.0" mnemonicParsing="false" styleClass="bouton" text="Ok" />
|
||||
<Button fx:id="okButton" minHeight="0.0" minWidth="0.0" mnemonicParsing="false" styleClass="bouton" text="%ok" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</ImageView>
|
||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Button fx:id="precedent" layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="Page précédente">
|
||||
<Button fx:id="precedent" layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="%page.precedente">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
@ -27,7 +27,7 @@
|
||||
<Insets right="20.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#retourMenu" prefHeight="59.0" prefWidth="106.0" styleClass="bouton" text="Menu">
|
||||
<Button mnemonicParsing="false" onMouseClicked="#retourMenu" prefHeight="59.0" prefWidth="106.0" styleClass="bouton" text="%menu">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
@ -35,7 +35,7 @@
|
||||
<Insets left="20.0" right="20.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button fx:id="suivant" mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="Page suivante">
|
||||
<Button fx:id="suivant" mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="%page.suivante">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</ImageView>
|
||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Button fx:id="precedent" layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="Page précédente">
|
||||
<Button fx:id="precedent" layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="%page.precedente">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
@ -27,7 +27,7 @@
|
||||
<Insets right="20.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#retourEnJeu" prefHeight="59.0" prefWidth="117.0" styleClass="bouton" text="Retour">
|
||||
<Button mnemonicParsing="false" onMouseClicked="#retourEnJeu" prefHeight="59.0" prefWidth="117.0" styleClass="bouton" text="%retour">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
@ -35,7 +35,7 @@
|
||||
<Insets left="20.0" right="20.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button fx:id="suivant" mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="Page suivante">
|
||||
<Button fx:id="suivant" mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="%page.suivante">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<children>
|
||||
<VBox fx:id="root" alignment="CENTER" layoutY="-1.0" prefHeight="480.0" prefWidth="640.0">
|
||||
<children>
|
||||
<Label text="Vous êtes :">
|
||||
<Label text="%vousetes">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
|
@ -11,15 +11,15 @@
|
||||
<children>
|
||||
<VBox alignment="CENTER" layoutX="37.0" layoutY="14.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Label fx:id="titre" alignment="CENTER" prefHeight="88.0" prefWidth="158.0" styleClass="text" text="Voulez vous faire cette action ?" wrapText="true">
|
||||
<Label fx:id="titre" alignment="CENTER" prefHeight="88.0" prefWidth="158.0" styleClass="text" text="%voulez.vous.faire.action" wrapText="true">
|
||||
<font>
|
||||
<Font size="13.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<HBox alignment="CENTER">
|
||||
<children>
|
||||
<Button fx:id="ouiButton" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" styleClass="bouton" text="Oui" />
|
||||
<Button fx:id="nonButton" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" styleClass="bouton" text="Non" />
|
||||
<Button fx:id="ouiButton" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" styleClass="bouton" text="%oui" />
|
||||
<Button fx:id="nonButton" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" styleClass="bouton" text="%non" />
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
|
@ -45,7 +45,7 @@
|
||||
</Button>
|
||||
</children>
|
||||
</HBox>
|
||||
<Label fx:id="titre" alignment="CENTER" contentDisplay="CENTER" styleClass="text" text="Choisir un joueur à attaquer !" />
|
||||
<Label fx:id="titre" alignment="CENTER" contentDisplay="CENTER" styleClass="text" text="%choisir.joueur.attaquer" />
|
||||
<HBox fx:id="joueurBas" alignment="BOTTOM_CENTER" spacing="3.0">
|
||||
<children>
|
||||
<Button fx:id="btn5" mnemonicParsing="false" styleClass="bouton" text="%joueur5">
|
||||
|
BIN
src/ihm/ressources/musique/cloche.wav
Normal file
BIN
src/ihm/ressources/musique/cloche.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user