diff --git a/pom.xml b/pom.xml index 7f927f5..0d19601 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ 3.2.3 natives-windows + 16 @@ -93,7 +94,12 @@ org.openjfx javafx-controls - 11 + ${javafx.version} + + + org.openjfx + javafx-fxml + ${javafx.version} diff --git a/src/Main.java b/src/Main.java index d4c19c8..7c9120e 100644 --- a/src/Main.java +++ b/src/Main.java @@ -9,25 +9,15 @@ import launcher.Launcher; import engine.Engine; +import javafx.application.Application; public class Main { - // Interface de configuration et lancement - static Launcher launcher = new Launcher(); - // Moteur de jeu static Engine game = new Engine(); public static void main(String[] args) { - - - // Lancement de l'interface de configuration du Jeu - try { - launcher.launch(); - } catch (Exception e) { - e.printStackTrace(); - } - + Application.launch(Launcher.class, args); } } diff --git a/src/launcher/Launcher.java b/src/launcher/Launcher.java index 9e34398..bf346f9 100644 --- a/src/launcher/Launcher.java +++ b/src/launcher/Launcher.java @@ -9,11 +9,20 @@ package launcher; -public class Launcher { +import javafx.application.Application; +import javafx.scene.Group; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.shape.Circle; +import javafx.stage.Stage; +import javafx.fxml.*; - public void launch() throws Exception { - - System.out.println("Hello world!"); +public class Launcher extends Application { + + Parent root = FXMLLoader.load("ui/main.fxml"); + Scene main = new Scene() + + public void start(Stage primaryStage) throws Exception { }