controller carte vision
This commit is contained in:
parent
4843f9932e
commit
67d955b6d8
69
src/ihm/controller/VisualiserCarte.java
Normal file
69
src/ihm/controller/VisualiserCarte.java
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
12
src/ihm/controller/VisualiserCarteVision.java
Normal file
12
src/ihm/controller/VisualiserCarteVision.java
Normal file
@ -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");
|
||||||
|
}
|
||||||
|
}
|
@ -7,24 +7,23 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
|
<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" fx:controller="ihm.controller.VisualiserCarte">
|
||||||
<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>
|
<children>
|
||||||
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" onMouseClicked="#fin" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="72.0" prefWidth="357.0">
|
<HBox alignment="CENTER" prefHeight="72.0" prefWidth="357.0">
|
||||||
<children>
|
<children>
|
||||||
<Label prefHeight="27.0" prefWidth="54.0" text="%carte" />
|
<Label prefHeight="27.0" prefWidth="54.0" text="%carte" />
|
||||||
<Label prefHeight="17.0" prefWidth="121.0" text="*Lumiere ou Tenebre" />
|
<Label fx:id="typeCarte" prefHeight="17.0" prefWidth="121.0" text="*Lumiere ou Tenebre" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<ImageView fitHeight="131.0" fitWidth="94.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="imageCarte" fitHeight="131.0" fitWidth="94.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
<HBox alignment="CENTER" prefHeight="111.0" prefWidth="600.0">
|
<HBox alignment="CENTER" prefHeight="111.0" prefWidth="600.0">
|
||||||
<children>
|
<children>
|
||||||
<Label prefHeight="27.0" prefWidth="54.0" text="%effet" />
|
<Label prefHeight="27.0" prefWidth="54.0" text="%effet" />
|
||||||
<Label prefHeight="27.0" prefWidth="91.0" text="*effet de la carte" />
|
<Label fx:id="effetCarte" prefHeight="27.0" prefWidth="91.0" text="*effet de la carte" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
@ -8,15 +8,14 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
|
<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" fx:controller="ihm.controller.VisualiserCarteVision">
|
||||||
<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>
|
<children>
|
||||||
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
||||||
<children>
|
<children>
|
||||||
<Label prefHeight="17.0" prefWidth="76.0" text="%carte.vision" />
|
<Label fx:id="typeCarte" prefHeight="17.0" prefWidth="76.0" text="%carte.vision" />
|
||||||
<ImageView fitHeight="104.0" fitWidth="75.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="imageCarte" fitHeight="104.0" fitWidth="75.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
<Label prefHeight="17.0" prefWidth="155.0" text="%carte.vue.par.joueur.pioche" />
|
<Label prefHeight="17.0" prefWidth="155.0" text="%carte.vue.par.joueur.pioche" />
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#voirCarte" text="%voir.carte">
|
<Button mnemonicParsing="false" onMouseClicked="#voirCarte" text="%voir.carte">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user