Responsive Plateau et Menu

This commit is contained in:
Paul Gross 2020-04-22 18:11:07 +02:00
parent f21d2a9319
commit c502639c82
3 changed files with 780 additions and 770 deletions

View File

@ -10,7 +10,7 @@ import javafx.stage.Stage;
public class Main extends Application{
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("ressources/jouerSonTour6.fxml"));
Parent root = FXMLLoader.load(getClass().getResource("ressources/Plateau.fxml"));
primaryStage.setTitle("Shadow Hunters");
primaryStage.setScene(new Scene(root));
primaryStage.show();

View File

@ -5,12 +5,16 @@
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<BorderPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
<children>
<BorderPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/menu.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<left>
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="240.0" BorderPane.alignment="CENTER">
<children>
@ -151,7 +155,8 @@
<Label styleClass="titre" stylesheets="@style/menu.css" text="Cochez la case pour avoir un joueur virtuel">
<font>
<Font size="36.0" />
</font></Label>
</font>
</Label>
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" stylesheets="@style/menu.css" text="Commencer la partie">
<font>
<Font size="24.0" />
@ -190,10 +195,13 @@
</HBox>
<HBox fx:id="hb2" alignment="CENTER" rotate="180.0">
<children>
<TextField>
<TextField accessibleRole="PARENT">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets />
</HBox.margin>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
@ -274,3 +282,5 @@
</VBox>
</bottom>
</BorderPane>
</children>
</AnchorPane>

View File

@ -5,12 +5,16 @@
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<BorderPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauController">
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauController">
<children>
<BorderPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<top>
<HBox alignment="CENTER" prefHeight="149.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
<children>
@ -162,7 +166,7 @@
</HBox>
</bottom>
<left>
<VBox alignment="CENTER" prefHeight="496.0" prefWidth="160.0" BorderPane.alignment="CENTER">
<VBox alignment="CENTER_LEFT" prefHeight="496.0" prefWidth="160.0" BorderPane.alignment="CENTER">
<children>
<VBox fx:id="joueur5" alignment="CENTER" prefHeight="181.0" prefWidth="333.0" rotate="90.0">
<children>
@ -236,7 +240,7 @@
</VBox>
</left>
<right>
<VBox prefHeight="496.0" prefWidth="214.0" BorderPane.alignment="CENTER">
<VBox alignment="CENTER_RIGHT" prefHeight="496.0" prefWidth="214.0" BorderPane.alignment="CENTER">
<children>
<VBox fx:id="joueur6" alignment="CENTER" prefHeight="163.0" prefWidth="329.0" rotate="270.0">
<children>
@ -310,9 +314,9 @@
</VBox>
</right>
<center>
<HBox prefHeight="496.0" prefWidth="869.0" BorderPane.alignment="CENTER">
<HBox alignment="CENTER" prefHeight="496.0" prefWidth="869.0" BorderPane.alignment="CENTER">
<children>
<VBox alignment="CENTER" prefHeight="496.0" prefWidth="22.0">
<VBox alignment="CENTER_LEFT" prefWidth="22.0">
<children>
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css">
<children>
@ -333,13 +337,10 @@
</children>
</HBox>
</children>
<HBox.margin>
<Insets right="15.0" />
</HBox.margin>
</VBox>
<VBox prefHeight="496.0" prefWidth="739.0">
<VBox alignment="CENTER" prefHeight="496.0" prefWidth="739.0">
<children>
<HBox prefHeight="339.0" prefWidth="676.0">
<HBox alignment="TOP_CENTER" prefHeight="339.0" prefWidth="676.0">
<children>
<VBox alignment="CENTER" prefHeight="223.0" prefWidth="0.0">
<children>
@ -398,7 +399,7 @@
</VBox>
</children>
</HBox>
<VBox prefHeight="200.0" prefWidth="100.0">
<VBox alignment="BOTTOM_CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<HBox alignment="CENTER_RIGHT" prefHeight="60.0" prefWidth="671.0">
<children>
@ -582,7 +583,7 @@
</VBox>
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="496.0" prefWidth="29.0">
<VBox alignment="CENTER_RIGHT" prefHeight="496.0" prefWidth="29.0">
<children>
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css">
<children>
@ -603,11 +604,10 @@
</children>
</HBox>
</children>
<HBox.margin>
<Insets left="15.0" />
</HBox.margin>
</VBox>
</children>
</HBox>
</center>
</BorderPane>
</children>
</AnchorPane>