From fc94ebc99f8fc77d683e9f475224d7b2b2ac5c58 Mon Sep 17 00:00:00 2001 From: Paul Gross Date: Tue, 12 May 2020 15:12:14 +0200 Subject: [PATCH] Changements IHM --- src/carte/CarteEquipement.java | 1 + src/ihm/controller/MenuController.java | 11 +++++++---- src/ihm/ressources/Choix_joueur.fxml | 4 ++-- src/main/GestionnaireJeu.java | 5 ----- src/main/Joueur.java | 10 ++++------ src/main/Plateau.java | 5 ++--- 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/carte/CarteEquipement.java b/src/carte/CarteEquipement.java index 0f6fe42..907086e 100644 --- a/src/carte/CarteEquipement.java +++ b/src/carte/CarteEquipement.java @@ -17,6 +17,7 @@ public abstract class CarteEquipement extends CartePiochable{ super(t, effet); } + @Override public void utiliser(Joueur j) { if(!j.getEquipements().contains(this)) { j.ajouterEquipement(this); diff --git a/src/ihm/controller/MenuController.java b/src/ihm/controller/MenuController.java index 2638250..9a84dec 100644 --- a/src/ihm/controller/MenuController.java +++ b/src/ihm/controller/MenuController.java @@ -46,10 +46,13 @@ public class MenuController implements Initializable{ AnchorPane pane = fxmlLoader.load(); Scene scene = new Scene(pane); Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow(); - appStage.setScene(scene); - appStage.show(); - + double width = appStage.getWidth(); + double height = appStage.getHeight(); + double X = appStage.getX(); + double Y = appStage.getY(); + + appStage.setScene(scene); } @FXML @@ -70,7 +73,7 @@ public class MenuController implements Initializable{ @FXML public void quitterLappli(MouseEvent mouseEvent) throws IOException{ System.exit(0); - } + } @FXML diff --git a/src/ihm/ressources/Choix_joueur.fxml b/src/ihm/ressources/Choix_joueur.fxml index 0a48196..126e49a 100644 --- a/src/ihm/ressources/Choix_joueur.fxml +++ b/src/ihm/ressources/Choix_joueur.fxml @@ -13,7 +13,7 @@ - + @@ -164,7 +164,7 @@ -