Début pre start game menu

julien
ZartaX0O3 4 years ago
parent 13c2aa15b6
commit 1c49732a8b

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXToggleButton?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SplitMenuButton?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<AnchorPane fx:id="levelRoot" xmlns:fx="http://javafx.com/fxml/1" id="pane" maxHeight="-Infinity" maxWidth="-Infinity"
minHeight="-Infinity"
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/11" fx:controller="controller.GameConfigMenuController">
<children>
<ImageView fitHeight="709.0" fitWidth="1072.0" layoutX="-16.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="/image/difficulty.jpg"/>
</image>
</ImageView>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="344.0" layoutX="33.0" layoutY="137.0" opacity="0.6"
stroke="BLACK" strokeLineCap="ROUND" strokeLineJoin="ROUND" strokeMiterLimit="0.0" strokeWidth="5.0"
width="272.0">
<cursor>
<Cursor fx:constant="DEFAULT"/>
</cursor>
</Rectangle>
<Label layoutX="44.0" layoutY="151.0" prefHeight="18.0" prefWidth="69.0" text="Difficulty" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="12.0"/>
</font>
</Label>
<Line endX="181.0" endY="-3.0517578125E-5" layoutX="107.0" layoutY="160.0" startX="1.0889129638671875"
startY="-1.52587890625E-5" stroke="#535252"/>
<JFXToggleButton prefHeight="33.0" prefWidth="75.0" selected="true" textFill="WHITE"
toggleColor="#8e8c8c"
toggleLineColor="WHITE" unToggleLineColor="#99999981"/>
<JFXToggleButton prefHeight="33.0" prefWidth="75.0" textFill="WHITE" toggleColor="#8e8c8c"
toggleLineColor="WHITE" unToggleLineColor="#99999981"/>
<JFXToggleButton prefHeight="33.0" prefWidth="75.0" textFill="WHITE" toggleColor="#8e8c8c"
toggleLineColor="WHITE" unToggleLineColor="#99999981"/>
<Line endX="240.5999755859375" endY="-3.0517578125E-5" layoutX="47.0" layoutY="467.0"
startX="1.0889129638671875"
startY="-1.52587890625E-5" stroke="#535252"/>
<Label layoutX="144.0" layoutY="229.0" text="Medium" textFill="#a9a1a1">
<font>
<Font name="Segoe UI Black" size="12.0"/>
</font>
</Label>
<Label layoutX="79.0" layoutY="229.0" text="Easy" textFill="#a9a1a1">
<font>
<Font name="Segoe UI Black" size="12.0"/>
</font>
</Label>
<Label layoutX="230.0" layoutY="229.0" text="Hard" textFill="#a9a1a1">
<font>
<Font name="Segoe UI Black" size="12.0"/>
</font>
</Label>
<Line endX="181.0" endY="-3.0517578125E-5" layoutX="107.0" layoutY="275.0" startX="-26.200027465820312"
startY="-3.0517578125E-5" stroke="#535252"/>
<Label layoutX="44.0" layoutY="265.0" prefHeight="18.0" prefWidth="30.0" text="Skin" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="12.0"/>
</font>
</Label>
<ImageView fitHeight="126.0" fitWidth="109.0" layoutX="38.0" layoutY="309.0" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="/image/personnage/Perso1.png"/>
</image>
</ImageView>
<SplitMenuButton alignment="CENTER" contentDisplay="CENTER" layoutX="152.0" layoutY="351.0"
mnemonicParsing="false" text="Choix Personnage">
<items>
<MenuItem mnemonicParsing="false" text="Personnage 1"/>
<MenuItem mnemonicParsing="false" text="Personnage 2"/>
<MenuItem mnemonicParsing="false" text="Personnage 3"/>
</items>
<font>
<Font name="Segoe UI Black" size="12.0"/>
</font>
</SplitMenuButton>
</children>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,37 @@
package controller;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import java.net.URL;
import java.util.Objects;
import java.util.ResourceBundle;
public class GameConfigMenuController implements Initializable {
@FXML
private AnchorPane levelRoot;
@FXML private RadioButton radioButton1;
@FXML private RadioButton radioButton2;
@FXML private RadioButton radioButton3;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
}
@FXML
void returnToMenu(MouseEvent event) throws Exception{
AnchorPane pane = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/MainPage.fxml")));
levelRoot.getChildren().setAll(pane);
}
}

@ -17,7 +17,7 @@ public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/ConfigurationMenu.fxml")));
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/GameConfigurationMenu.fxml")));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 900, 600));
primaryStage.setResizable(false);

@ -11,10 +11,7 @@
<?import javafx.scene.text.*?>
<?import java.net.URL?>
<AnchorPane fx:id="levelRoot" xmlns:fx="http://javafx.com/fxml/1" id="pane" maxHeight="-Infinity" maxWidth="-Infinity"
minHeight="-Infinity"
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/11" fx:controller="controller.TopPlayerController">
<AnchorPane>
<ImageView fitHeight="600.0" fitWidth="1300" layoutX="133.0" layoutY="150.0" pickOnBounds="true" preserveRatio="true"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Loading…
Cancel
Save