startup changes

This commit is contained in:
Djeeberjr 2022-02-22 01:48:31 +01:00
parent e2431666e1
commit 418952bd25

View File

@ -1,3 +1,4 @@
import haxe.MainLoop;
import kernel.Init;
import lib.ui.Observable;
import lib.ui.TextElement;
@ -11,20 +12,11 @@ class Startup {
public static function main() {
Init.initKernel();
MainLoop.add(() -> {
KernelEvents.instance.startEventLoop();
},0);
exampleUI();
KernelEvents.instance.startEventLoop();
}
static function exampleProgramm() {
var context = WindowManager.instance.createNewContext();
context.clickSignal.handle(data -> {
context.setCursorPos(data.pos.x,data.pos.y);
context.write("x");
});
context.write("Example programm");
}
static function exampleUI() {
@ -38,7 +30,7 @@ class Startup {
]);
ui.render();
context.clickSignal.handle(data -> {
text.set("Holla mundo");
});