changed kernel events to static class
This commit is contained in:
@@ -20,7 +20,7 @@ class WindowManager {
|
||||
|
||||
@:allow(kernel.Init)
|
||||
private function new() {
|
||||
KernelEvents.instance.onKey.handle(params -> {
|
||||
KernelEvents.onKey.handle(params -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -31,7 +31,7 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onKeyUp.handle(keyCode -> {
|
||||
KernelEvents.onKeyUp.handle(keyCode -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -42,7 +42,7 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onMouseClick.handle(params -> {
|
||||
KernelEvents.onMouseClick.handle(params -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -53,7 +53,7 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onMouseDrag.handle(params -> {
|
||||
KernelEvents.onMouseDrag.handle(params -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -64,7 +64,7 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onMouseScroll.handle(params -> {
|
||||
KernelEvents.onMouseScroll.handle(params -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -75,7 +75,7 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onMouseUp.handle(params -> {
|
||||
KernelEvents.onMouseUp.handle(params -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -86,7 +86,7 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onPaste.handle(text -> {
|
||||
KernelEvents.onPaste.handle(text -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
@@ -97,11 +97,11 @@ class WindowManager {
|
||||
}
|
||||
});
|
||||
|
||||
KernelEvents.instance.onMonitorTouch.handle(params -> {
|
||||
KernelEvents.onMonitorTouch.handle(params -> {
|
||||
// TODO
|
||||
});
|
||||
|
||||
KernelEvents.instance.onChar.handle(char -> {
|
||||
KernelEvents.onChar.handle(char -> {
|
||||
if (currentMainContext != null) {
|
||||
if (currentMainContext.eventDelegate != null){
|
||||
var foo = currentMainContext.eventDelegate.getEventHandlers();
|
||||
|
||||
Reference in New Issue
Block a user