Added a pretty title screen to the application.
- Created a GUI title screen - Drew images to be display on the title - Created controller for the title - Changed visualiser main to initially display title - Added functionality for host button #story[1087]
This commit is contained in:
@@ -21,6 +21,11 @@ public class App extends Application {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that displays the visualiser, starting with the title screen.
|
||||
* @param stage the stage to be displayed
|
||||
* @throws Exception if something wrong with title screen
|
||||
*/
|
||||
public void start(Stage stage) throws Exception {
|
||||
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
|
||||
@Override
|
||||
@@ -29,10 +34,11 @@ public class App extends Application {
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/visualiser/scenes/main.fxml"));
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource
|
||||
("/visualiser/scenes/titleScreen.fxml"));
|
||||
Parent root = loader.load();
|
||||
Scene scene = new Scene(root, 1200, 800);
|
||||
scene.getStylesheets().add("/css/nightMode.css");
|
||||
stage.setResizable(false);
|
||||
Scene scene = new Scene(root);
|
||||
|
||||
stage.setScene(scene);
|
||||
stage.setTitle("RaceVision - Team 7");
|
||||
|
||||
Reference in New Issue
Block a user