changed kernel events to static class

This commit is contained in:
2023-07-27 20:30:39 +02:00
parent adc5ab1849
commit e1e0180502
12 changed files with 154 additions and 156 deletions

View File

@@ -39,7 +39,7 @@ class Debug {
#if Debug
public static function printKernelEventsCount(){
KernelEvents.instance.printListenerCount();
KernelEvents.printListenerCount();
}
#end

View File

@@ -54,7 +54,7 @@ class HomeContext {
requestRender();
// Register global key bindings to react to main terminal
KernelEvents.instance.onKey.handle(e -> {
KernelEvents.onKey.handle(e -> {
// Is HOME pressed?
// TODO: remove magic number
if (e.keyCode == 268) {
@@ -165,7 +165,7 @@ class HomeContext {
}
children.push(new TextElement('Output: ${selectedOutput}',{ uiEvents:{ onClick: this.cycleOutput}}));
children.push(new TextElement('Exit', {style: {bgColor: Red}, uiEvents: {onClick: KernelEvents.instance.shutdown}}));
children.push(new TextElement('Exit', {style: {bgColor: Red}, uiEvents: {onClick: KernelEvents.shutdown}}));
renderer.setChildren(children);