Issue 19 changes.
This commit is contained in:
@@ -11,6 +11,8 @@ import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
import visualiser.Controllers.MainController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class App extends Application {
|
||||
private static Stage stage;
|
||||
|
||||
@@ -36,16 +38,22 @@ public class App extends Application {
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/visualiser/scenes/main.fxml"));
|
||||
App.stage = stage;
|
||||
loadStart(App.stage);
|
||||
}
|
||||
|
||||
public static void loadStart(Stage stage) throws IOException {
|
||||
FXMLLoader loader = new FXMLLoader(App.class.getResource("/visualiser/scenes/main.fxml"));
|
||||
Parent root = loader.load();
|
||||
stage.setResizable(false);
|
||||
MainController mc = (MainController) loader.getController();
|
||||
mc.enterTitle();
|
||||
Scene scene = new Scene(root);
|
||||
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.setTitle("RaceVision - Team 7");
|
||||
stage.getIcons().add(new Image(getClass().getClassLoader().getResourceAsStream("images/SailIcon.png")));
|
||||
stage.getIcons().add(new Image(App.class.getClassLoader().getResourceAsStream("images/SailIcon.png")));
|
||||
mc.startCss();
|
||||
setStage(stage);
|
||||
stage.show();
|
||||
|
||||
Reference in New Issue
Block a user