diff --git a/.classpath b/.classpath index 675385c..914add1 100644 --- a/.classpath +++ b/.classpath @@ -1,9 +1,13 @@ - + + + + + + - diff --git a/pom.xml b/pom.xml index 4c4995f..3ba0902 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ - src/launcher/ui + /src/launcher/ui diff --git a/src/launcher/FXMLController.java b/src/launcher/FXMLController.java new file mode 100644 index 0000000..37efe09 --- /dev/null +++ b/src/launcher/FXMLController.java @@ -0,0 +1,25 @@ +package launcher; + +import javafx.fxml.FXML; + +public class FXMLController { + + public FXMLController() { + } + + @FXML + public void launch() { + Launcher.runGame(); + } + + @FXML + public void settings() { + + } + + @FXML + public void quit() { + System.exit(0); + } + +} diff --git a/src/launcher/Launcher.java b/src/launcher/Launcher.java index 5aa98bd..76353b8 100644 --- a/src/launcher/Launcher.java +++ b/src/launcher/Launcher.java @@ -13,25 +13,53 @@ import javafx.application.Application; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; -import javafx.stage.StageStyle; import javafx.fxml.*; +import engine.Engine; + public class Launcher extends Application { + public static Launcher pointer; + private static Settings setter; + + public Launcher() { + pointer = this; + try { + setter = new Settings(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + /* * Start method is used by Launcher as an implementation of the Application class to create a JavaFX thread to display the GUI window */ public void start(Stage primaryStage) throws Exception { - Parent root = FXMLLoader.load(getClass().getResource("ui/launcher.fxml")); + Parent root = FXMLLoader.load(getClass().getResource("/launcher/ui/launcher.fxml")); Scene main = new Scene(root); - primaryStage.initStyle(StageStyle.UNDECORATED); + //primaryStage.initStyle(StageStyle.UNDECORATED); primaryStage.setTitle("Boulevard Combattant"); primaryStage.setScene(main); primaryStage.show(); - + } + public static void runGame() { + try { + setter.setSettings(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + Engine.main(null); + } + + public static void openSettings() { + + } + } diff --git a/src/launcher/ui/launcher.fxml b/src/launcher/ui/launcher.fxml index a843edc..75dd44f 100644 --- a/src/launcher/ui/launcher.fxml +++ b/src/launcher/ui/launcher.fxml @@ -1,91 +1,53 @@ - - - - + + - + + - + + - - - - - + + - - -