Fixed resource not being found by Launcher

This commit is contained in:
François Autin 2021-06-03 01:53:32 +02:00
parent 0d7c08aa5d
commit 24338e344c
No known key found for this signature in database
GPG Key ID: 24025429AC559B7C
3 changed files with 4 additions and 3 deletions

View File

@ -37,7 +37,7 @@ public class Launcher extends Application {
*/
public void start(Stage primaryStage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("/launcher/ui/launcher.fxml"));
Parent root = FXMLLoader.load(getClass().getResource("launcher.fxml"));
Scene main = new Scene(root);
@ -51,11 +51,12 @@ public class Launcher extends Application {
public static void runGame() {
try {
setter.setSettings();
Engine.main(null);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
Engine.main(null);
}
public static void openSettings() {

View File

@ -7,7 +7,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.layout.Pane?>
<HBox xmlns:fx="http://javafx.com/fxml" stylesheets="/launcher/ui/style.css" fx:id="window"
<HBox xmlns:fx="http://javafx.com/fxml" stylesheets="@style.css" fx:id="window"
prefWidth="640" prefHeight="380"
fx:controller="launcher.FXMLController">