From 67d955b6d839b096e4025b11072857da9b6637b6 Mon Sep 17 00:00:00 2001 From: Chiara Date: Wed, 6 May 2020 16:00:14 +0200 Subject: [PATCH] controller carte vision --- src/ihm/controller/VisualiserCarte.java | 69 +++++++++++++++++++ src/ihm/controller/VisualiserCarteVision.java | 12 ++++ ...ouer_tour(2ba)piocher_lumiere_tenebre.fxml | 11 ++- .../Jouer_tour(2bb1)piocher_vision.fxml | 7 +- 4 files changed, 89 insertions(+), 10 deletions(-) create mode 100644 src/ihm/controller/VisualiserCarte.java create mode 100644 src/ihm/controller/VisualiserCarteVision.java diff --git a/src/ihm/controller/VisualiserCarte.java b/src/ihm/controller/VisualiserCarte.java new file mode 100644 index 0000000..aa0862c --- /dev/null +++ b/src/ihm/controller/VisualiserCarte.java @@ -0,0 +1,69 @@ +package ihm.controller; + +import java.net.URL; +import java.util.ResourceBundle; + +import carte.Carte; +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.control.Label; +import javafx.scene.image.ImageView; +import javafx.scene.input.MouseEvent; + +public class VisualiserCarte implements Initializable{ + @FXML private Label typeCarte; + @FXML private Label effetCarte; + @FXML private ImageView imageCarte; + + private Carte carte; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + /*typeCarte.setText(carte.getNom()); + effetCarte.setText(carte.getDescription());*/ + } + + /** + * signe la fin du tour + * @param mouseEvent click n'importe ou sur la fenetre + */ + @FXML + private void fin (MouseEvent mouseEvent) { + + } + + public Label getTypeCarte() { + return typeCarte; + } + + public void setTypeCarte(Label typeCarte) { + this.typeCarte = typeCarte; + } + + public Label getEffetCarte() { + return effetCarte; + } + + public void setEffetCarte(Label effetCarte) { + this.effetCarte = effetCarte; + } + + public ImageView getImageCarte() { + return imageCarte; + } + + public void setImageCarte(ImageView imageCarte) { + this.imageCarte = imageCarte; + } + + public Carte getCarte() { + return carte; + } + + public void setCarte(Carte carte) { + this.carte = carte; + } + + + +} diff --git a/src/ihm/controller/VisualiserCarteVision.java b/src/ihm/controller/VisualiserCarteVision.java new file mode 100644 index 0000000..a422ed8 --- /dev/null +++ b/src/ihm/controller/VisualiserCarteVision.java @@ -0,0 +1,12 @@ +package ihm.controller; + +import javafx.fxml.FXML; +import javafx.scene.input.MouseEvent; + +public class VisualiserCarteVision extends VisualiserCarte{ + @FXML + public void voirCarte(MouseEvent mouseEvent) { + //super.getImageCarte().setImage(arg0); + System.out.println("\tCarte vision"); + } +} diff --git a/src/ihm/ressources/Jouer_tour(2ba)piocher_lumiere_tenebre.fxml b/src/ihm/ressources/Jouer_tour(2ba)piocher_lumiere_tenebre.fxml index fe808d0..4b53126 100644 --- a/src/ihm/ressources/Jouer_tour(2ba)piocher_lumiere_tenebre.fxml +++ b/src/ihm/ressources/Jouer_tour(2ba)piocher_lumiere_tenebre.fxml @@ -7,24 +7,23 @@ - - + - + - + diff --git a/src/ihm/ressources/Jouer_tour(2bb1)piocher_vision.fxml b/src/ihm/ressources/Jouer_tour(2bb1)piocher_vision.fxml index dc7f7db..62a765e 100644 --- a/src/ihm/ressources/Jouer_tour(2bb1)piocher_vision.fxml +++ b/src/ihm/ressources/Jouer_tour(2bb1)piocher_vision.fxml @@ -8,15 +8,14 @@ - - + -