mirror of
https://github.com/badvision/jace.git
synced 2024-06-08 09:29:32 +00:00
0ccb63558f
The video rendering was re-written to use writableImages and is displaying (something) but keyboard input and configurations are broken so nothing much happens after the inital boot. Basically the underlying part to make this show up in JavaFX is starting to take shape.
59 lines
1.6 KiB
Java
59 lines
1.6 KiB
Java
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
package jace;
|
|
|
|
import java.io.IOException;
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Scene;
|
|
import javafx.scene.layout.AnchorPane;
|
|
import javafx.stage.Stage;
|
|
|
|
/**
|
|
*
|
|
* @author blurry
|
|
*/
|
|
public class JaceApplication extends Application {
|
|
|
|
Stage primaryStage;
|
|
JaceUIController controller;
|
|
|
|
@Override
|
|
public void start(Stage stage) throws Exception {
|
|
primaryStage = stage;
|
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/JaceUI.fxml"));
|
|
fxmlLoader.setResources(null);
|
|
try {
|
|
AnchorPane node = (AnchorPane) fxmlLoader.load();
|
|
controller = fxmlLoader.getController();
|
|
controller.initialize();
|
|
Scene s = new Scene(node);
|
|
primaryStage.setScene(s);
|
|
} catch (IOException exception) {
|
|
throw new RuntimeException(exception);
|
|
}
|
|
|
|
primaryStage.show();
|
|
Emulator e = new Emulator();
|
|
javafx.application.Platform.runLater(() -> {
|
|
while (Emulator.computer.getVideo() == null || Emulator.computer.getVideo().getFrameBuffer() == null) {
|
|
Thread.yield();
|
|
}
|
|
controller.connectScreen(Emulator.computer.getVideo());
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @param args the command line arguments
|
|
*/
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
|
|
}
|