From 6183e39773b1da5c965d09e93a02c507e245266f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Thu, 3 Jun 2021 03:46:38 +0200 Subject: [PATCH] Removed FXMLController, gave controller role to Launcher instead --- src/launcher/FXMLController.java | 25 ------------------------- src/launcher/Launcher.java | 22 +++++++++++++++++++--- 2 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 src/launcher/FXMLController.java diff --git a/src/launcher/FXMLController.java b/src/launcher/FXMLController.java deleted file mode 100644 index 37efe09..0000000 --- a/src/launcher/FXMLController.java +++ /dev/null @@ -1,25 +0,0 @@ -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 2a32a12..6899a35 100644 --- a/src/launcher/Launcher.java +++ b/src/launcher/Launcher.java @@ -13,6 +13,7 @@ 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; @@ -41,7 +42,7 @@ public class Launcher extends Application { Scene main = new Scene(root); - //primaryStage.initStyle(StageStyle.UNDECORATED); + primaryStage.initStyle(StageStyle.UNDECORATED); primaryStage.setTitle("Boulevard Combattant"); primaryStage.setScene(main); primaryStage.show(); @@ -56,11 +57,26 @@ public class Launcher extends Application { e.printStackTrace(); System.exit(1); } + } + + @FXML + public void launch() { + Launcher.runGame(); + } + + @FXML + public void settings() { } - public static void openSettings() { - + @FXML + public void quit() { + System.exit(0); + } + + @FXML + public void website() { + getHostServices().showDocument("https://gitlab.istic.univ-rennes1.fr/fautin/jeu-de-combat"); } }