changed kernel events to static class
This commit is contained in:
@@ -39,7 +39,7 @@ class Debug {
|
||||
|
||||
#if Debug
|
||||
public static function printKernelEventsCount(){
|
||||
KernelEvents.instance.printListenerCount();
|
||||
KernelEvents.printListenerCount();
|
||||
}
|
||||
#end
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user