start using tinker
This commit is contained in:
@@ -1,33 +1,25 @@
|
||||
import kernel.Init;
|
||||
import lib.ui.Observable;
|
||||
import lib.ui.TextElement;
|
||||
import lib.ui.ReactiveUI;
|
||||
import kernel.Log;
|
||||
import util.Debug;
|
||||
import kernel.ui.WindowManager;
|
||||
import kernel.net.Net;
|
||||
import kernel.KernelEvents;
|
||||
|
||||
using util.Extender.LambdaExtender;
|
||||
|
||||
class Startup {
|
||||
static public function main() {
|
||||
// OS.sleep(Math.random() * 3); // Native lua call to `sleep`
|
||||
Net.instance.init();
|
||||
WindowManager.instance.init();
|
||||
|
||||
Debug.printBuildInfo();
|
||||
public static function main() {
|
||||
Init.initKernel();
|
||||
|
||||
exampleUI();
|
||||
|
||||
Log.moveToOutput("top");
|
||||
|
||||
KernelEvents.instance.startEventLoop();
|
||||
}
|
||||
|
||||
static function exampleProgramm() {
|
||||
var context = WindowManager.instance.createNewContext();
|
||||
|
||||
context.clickSignal.on(data -> {
|
||||
context.clickSignal.handle(data -> {
|
||||
context.setCursorPos(data.pos.x,data.pos.y);
|
||||
context.write("x");
|
||||
});
|
||||
@@ -47,7 +39,7 @@ class Startup {
|
||||
|
||||
ui.render();
|
||||
|
||||
context.clickSignal.on(data -> {
|
||||
context.clickSignal.handle(data -> {
|
||||
text.set("Holla mundo");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user