affichage d'écran de victoire à la fin de la partie

This commit is contained in:
Kruss
2020-05-15 10:43:30 +02:00
parent 25205bf874
commit 0558d127e4
4 changed files with 29 additions and 2 deletions

View File

@ -77,7 +77,7 @@ public class FinDePartieControlleur implements Initializable {
JVainqueur.getChildren().add(ivJoueur);
*/
Label nomJoueurGagant = new Label();
nomJoueurGagant.setText(listeWinner.get(i).getNom() + "qui était "+ listeWinner.get(i).getCartePersonnage().getNom() + " ("+listeWinner.get(i).getCartePersonnage().getEquipe()+ ")");
nomJoueurGagant.setText(listeWinner.get(i).getNom() + " qui était "+ listeWinner.get(i).getCartePersonnage().getNom() + " ("+listeWinner.get(i).getCartePersonnage().getEquipe()+ ")");
nomJoueurGagant.setFont(new Font("Arial", 36));
nomJoueurGagant.setStyle("-fx-text-fill: white");
JVainqueur.getChildren().add(nomJoueurGagant);

View File

@ -65,6 +65,7 @@ public class PlateauController implements Initializable {
private ChoisirJoueur cj;
private PiocherCarte pc;
private LancerDes ld;
private FinDePartieControlleur fdpc;
private static Map<Carte, BufferedImage> mapRessourcesCartes;
private static Map<String, BufferedImage> mapRessourcesDosCartes;
@ -631,4 +632,14 @@ public class PlateauController implements Initializable {
jihm.getRevealButton().fire();
}
public void afficherVictoire(List<Joueur> gagnants) throws IOException {
final URL fxmlURL = PlateauController.class.getResource("/ihm/ressources/Fin_De_Partie.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load();
this.fdpc = fxmlLoader.getController();
fdpc.setListeWinner(gagnants);
rootPane.getChildren().setAll(pane);
}
}