Removed FXMLController, gave controller role to Launcher instead

This commit is contained in:
François Autin 2021-06-03 03:46:38 +02:00
parent 1476cbed43
commit 6183e39773
No known key found for this signature in database
GPG Key ID: 24025429AC559B7C
2 changed files with 19 additions and 28 deletions

View File

@ -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);
}
}

View File

@ -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");
}
}