diff --git a/src/ihm/Main.java b/src/ihm/Main.java index 103d74b..2d73779 100644 --- a/src/ihm/Main.java +++ b/src/ihm/Main.java @@ -11,6 +11,7 @@ public class Main extends Application { public void start(Stage primaryStage) throws Exception { System.out.println("Lancement de l'application"); + Pane root = FXMLLoader.load(getClass().getResource("ressources/PlateauTestPaul.fxml")); // "ressources/Jouer_tour(1)lancer_des.fxml" primaryStage.show(); diff --git a/src/ihm/controller/MenuJoueurController.java b/src/ihm/controller/MenuJoueurController.java new file mode 100644 index 0000000..ebb8263 --- /dev/null +++ b/src/ihm/controller/MenuJoueurController.java @@ -0,0 +1,37 @@ +package ihm.controller; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; +import javafx.scene.Parent; +import javafx.scene.control.SplitPane; +import javafx.scene.image.ImageView; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.AnchorPane; + +public class MenuJoueurController implements Initializable{ + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + //nomJoueur.setText(joueur.getNom()); + } + + @FXML + public void changeZoneToScrollPaneJoueur(MouseEvent me) throws IOException { + + AnchorPane bp = FXMLLoader.load(getClass().getResource("../ressources/ScrollPaneJoueur.fxml")); + ImageView iv = ((ImageView)me.getSource()); + Parent p = iv.getParent().getParent(); + AnchorPane ap = (AnchorPane)p; + ap.getChildren().setAll(bp); + AnchorPane.setTopAnchor(bp, 0.0); + AnchorPane.setBottomAnchor(bp, 0.0); + AnchorPane.setLeftAnchor(bp, 0.0); + AnchorPane.setRightAnchor(bp, 0.0); + } + +} diff --git a/src/ihm/controller/PlateauControllerTest.java b/src/ihm/controller/PlateauControllerTest.java index 16146d9..a551adc 100644 --- a/src/ihm/controller/PlateauControllerTest.java +++ b/src/ihm/controller/PlateauControllerTest.java @@ -3,50 +3,28 @@ package ihm.controller; import java.io.IOException; import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; import java.util.ResourceBundle; -import ihm.PopUp; import ihm.PopUpBoolean; -import ihm.SpriteAnimation; -import javafx.animation.Animation; -import javafx.event.Event; -import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; -import javafx.geometry.Rectangle2D; -import javafx.scene.Group; import javafx.scene.Parent; -import javafx.scene.control.Button; -import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; import javafx.scene.image.ImageView; import javafx.scene.layout.AnchorPane; -import javafx.scene.layout.VBox; -import javafx.util.Duration; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.Pane; import main.Joueur; public class PlateauControllerTest implements Initializable { - private List listJoueur = new ArrayList(); - private List vboxJoueur = new ArrayList(); - private List