Réorganisation du projet

julien
ZartaX0O3 4 years ago
parent 0e81d33751
commit 3ecfd18833

@ -1,8 +0,0 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<GridPane fx:controller="sample.Controller"
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
</GridPane>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.*?>
<?import java.net.URL?>
<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">
<Image url="/image/plaine.gif"/>
</ImageView>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="50" opacity="0.42" stroke="BLACK"
strokeType="INSIDE" width="800.0"/>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB

@ -1,4 +0,0 @@
package sample;
public class Controller {
}

@ -1,52 +0,0 @@
package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.*;
import java.util.Objects;
public class Main extends Application {
private static Database currentd;
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("MainPage.fxml")));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 900, 600));
primaryStage.setResizable(false);
primaryStage.show();
}
public static Database getDatabase(){
return currentd;
}
public static void serialize() throws IOException {
try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("database.txt"))) {
out.writeObject(currentd);
} finally {
//System.out.println("Saved!");
System.exit(0);
}
}
public static void deserialize() throws ClassNotFoundException, IOException{
ObjectInputStream in = null;
try {
in=new ObjectInputStream (new FileInputStream("database.txt"));
currentd=(Database) in.readObject();
in.close();
}
catch (FileNotFoundException | NullPointerException e){
currentd=new Database();
}
}
public static void main(String[] args) {
launch(args);
}
}

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<StackPane stylesheets="/css/sample.css" prefWidth="400.0" xmlns="http://javafx.com/javafx/8" styleClass="root">
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
<GridPane hgap="15.0" minHeight="350" vgap="15.0" StackPane.alignment="CENTER">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" halignment="CENTER"/>
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="NEVER"/>
<RowConstraints minHeight="10.0" vgrow="NEVER"/>
</rowConstraints>
<Button styleClass="round-red" minWidth="-Infinity" text="Launch new game" GridPane.columnIndex="0" GridPane.rowIndex="0"/>
<Button styleClass="round-red" minWidth="-Infinity" text="View best Score" GridPane.columnIndex="0" GridPane.rowIndex="1"/>
</GridPane>
</StackPane>

@ -0,0 +1,4 @@
#player{
-fx-text-fill: #ffffff;
}

@ -0,0 +1,10 @@
.round-red {
-fx-background-color: linear-gradient(#ff5400, #EB9C0A);
-fx-background-radius: 30;
-fx-background-insets: 0;
-fx-text-fill: white;
}
.root{
-fx-background-color: #3A3A41;
}

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.shape.Circle?>
<?import javafx.scene.text.Font?>
<AnchorPane fx:id="mainRoot" 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.MainPageController">
<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">
<Image url="/image/plaine.gif"/>
</ImageView>
<Circle layoutX="146.0" layoutY="138.0" opacity="0.42" radius="219.0" stroke="BLACK" strokeType="INSIDE"/>
<ImageView fitHeight="205.0" fitWidth="204.0" layoutX="61.0" layoutY="-26.0" pickOnBounds="true"
preserveRatio="true">
<Image url="/image/logo.png"/>
</ImageView>
<JFXButton layoutX="104.0" layoutY="163.0" prefHeight="30.0" prefWidth="119.0"
style="-fx-background-color: #EB9C0A;" text="New Game" textFill="WHITE" onMouseClicked="#startGame">
<font>
<Font name="Segoe UI Black" size="15.0"/>
</font>
<effect>
<Shadow/>
</effect>
</JFXButton>
<JFXButton layoutX="104.0" layoutY="222.0" prefHeight="30.0" prefWidth="119.0"
style="-fx-background-color: #EB9C0A;" text="Best Players" textFill="WHITE" onMouseClicked="#viewScore">
<font>
<Font name="Segoe UI Black" size="15.0"/>
</font>
<effect>
<Shadow/>
</effect>
</JFXButton>
</AnchorPane>

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.shape.Rectangle?>
<?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">
<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">
<Image url="/image/plaine.gif"/>
</ImageView>
<JFXButton onMouseClicked="#returnToMenu" layoutX="20.0" layoutY="10.0" prefHeight="30.0" prefWidth="80.0"
style="-fx-background-color: #EB9C0A;"
text="Retour" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="13.0"/>
</font>
<effect>
<Shadow/>
</effect>
</JFXButton>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="200" opacity="0.42" stroke="BLACK"
strokeType="INSIDE" width="500.0"/>
<ImageView fitHeight="205.0" fitWidth="204.0" layoutX="350.0" layoutY="-4.0" pickOnBounds="true"
preserveRatio="true">
<Image url="/image/logo.png"/>
</ImageView>
<Label layoutX="387.0" layoutY="168.0" text="Top Players">
<font>
<Font name="Segoe UI Black" size="22.0"/>
</font>
</Label>
<Label layoutX="395.0" layoutY="211.0" text="1 - ZartaX0O3">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
<textFill>
<LinearGradient startX="0.3981042654028436">
<stops>
<Stop>
<color>
<Color red="0.9342105388641357" green="0.7629386186599731"/>
</color>
</Stop>
<Stop offset="1.0">
<color>
<Color red="1.0" green="0.5557553768157959"/>
</color>
</Stop>
</stops>
</LinearGradient>
</textFill>
</Label>
<Label layoutX="250.0" layoutY="260.0" text="2 - ZartaX0O3">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
<textFill>
<LinearGradient endX="1.0" endY="1.0" startX="0.4075829383886256">
<stops>
<Stop>
<color>
<Color/>
</color>
</Stop>
<Stop offset="1.0">
<color>
<Color red="1.0" green="1.0" blue="1.0"/>
</color>
</Stop>
</stops>
</LinearGradient>
</textFill>
</Label>
<Label layoutX="530.0" layoutY="260.0" text="3 - ZartaX0O3">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
<textFill>
<LinearGradient endX="1.0" endY="1.0" startX="0.3981042654028436">
<stops>
<Stop>
<color>
<Color red="0.4868420958518982" green="0.32828032970428467" blue="0.03380848094820976"/>
</color>
</Stop>
<Stop offset="1.0">
<color>
<Color red="0.05263157933950424" green="0.051315788179636" blue="0.049707602709531784"/>
</color>
</Stop>
</stops>
</LinearGradient>
</textFill>
</Label>
<Label id="player" layoutX="395.0" layoutY="315.0" text="4 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="382.0" text="6 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="347.0" text="5 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="417.0" text="7 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="450.0" text="8 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="486.0" text="9 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
</AnchorPane>

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="500.0" prefWidth="800.0" style="-fx-background-color: White;">
<children>
<AnchorPane prefHeight="46.0" prefWidth="800.0" style="-fx-background-color: #002d40;">
<children>
<Label layoutX="7.0" layoutY="7.0">
<graphic>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<Image url="image/button/burger.png" />
</ImageView>
</graphic>
</Label>
<ImageView fitHeight="24.0" fitWidth="24.0" layoutX="762.0" layoutY="11.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@image/exit.png" />
</image>
</ImageView>
</children>
</AnchorPane>
<AnchorPane layoutY="46.0" prefHeight="454.0" prefWidth="44.0" style="-fx-background-color: white;">
<children>
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="44.0" spacing="10.0" style="-fx-background-color: white;" AnchorPane.topAnchor="20.0">
<children>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/home.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/add.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/data.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/user.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/setting.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/backup.png" />
</image>
</ImageView>
</children>
</VBox>
</children>
</AnchorPane>
<AnchorPane layoutX="44.0" layoutY="46.0" prefHeight="454.0" prefWidth="756.0" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0">
<children>
<Pane layoutY="21.0" prefHeight="454.0" prefWidth="756.0" style="-fx-background-color: #d9ecf2;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #000;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
<AnchorPane prefHeight="454.0" prefWidth="178.0" style="-fx-background-color: White;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="40.0">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0">
<children>
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" prefHeight="38.0" prefWidth="179.0" text="Dashboard">
<font>
<Font size="16.0" />
</font>
</JFXButton>
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="10.0" prefHeight="38.0" prefWidth="179.0" text="Add New">
<font>
<Font size="16.0" />
</font>
</JFXButton>
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="58.0" prefHeight="38.0" prefWidth="179.0" text="Data">
<font>
<Font size="16.0" />
</font>
</JFXButton>
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="106.0" prefHeight="38.0" prefWidth="179.0" text="User">
<font>
<Font size="16.0" />
</font>
</JFXButton>
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="154.0" prefHeight="38.0" prefWidth="179.0" text="Setting">
<font>
<Font size="16.0" />
</font>
</JFXButton>
<JFXButton alignment="BASELINE_LEFT" buttonType="RAISED" layoutX="10.0" layoutY="202.0" prefHeight="38.0" prefWidth="179.0" text="BackUp">
<font>
<Font size="16.0" />
</font>
</JFXButton>
</children>
</VBox>
</children>
</AnchorPane>
<AnchorPane prefHeight="454.0" prefWidth="44.0" style="-fx-background-color: white;" AnchorPane.bottomAnchor="0.0">
<children>
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="44.0" spacing="10.0" style="-fx-background-color: white;" AnchorPane.topAnchor="20.0">
<children>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="image/button/burger.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/add.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/data.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/user.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/setting.png" />
</image>
</ImageView>
<ImageView fitHeight="46.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@images/backup.png" />
</image>
</ImageView>
</children>
</VBox>
</children>
</AnchorPane>
</children>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB

Loading…
Cancel
Save