mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
9795083d4d
- clicking confirm button will exit the dialog - [WIP] exit without clicking confirm button will still save changes, which should be fixed in the future tags: #story[1273]
47 lines
1.3 KiB
Java
47 lines
1.3 KiB
Java
package seng302.visualiser.controllers;
|
|
|
|
import java.net.URL;
|
|
import java.util.ResourceBundle;
|
|
import javafx.application.Platform;
|
|
import javafx.fxml.FXML;
|
|
import javafx.fxml.Initializable;
|
|
import javafx.scene.layout.StackPane;
|
|
import javafx.stage.Stage;
|
|
|
|
/**
|
|
* Created by Kusal on 26-Sep-17.
|
|
*/
|
|
public class SplashScreenController implements Initializable{
|
|
|
|
@FXML
|
|
private StackPane rootPane;
|
|
|
|
@Override
|
|
public void initialize(URL location, ResourceBundle resources) {
|
|
new SplashScreen().start();
|
|
}
|
|
|
|
|
|
class SplashScreen extends Thread {
|
|
public void run(){
|
|
try {
|
|
Thread.sleep(3000);
|
|
Platform.runLater(new Runnable() {
|
|
@Override
|
|
public void run() {
|
|
try {
|
|
Stage stage = new Stage();
|
|
ViewManager.getInstance().initialStartView(stage);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
rootPane.getScene().getWindow().hide();
|
|
}
|
|
});
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|