Closed sh-dave closed 3 years ago
Can you explain what this does? Im not 100% sure i follow.
Instead of always using kha.input.Mouse.get().notify(...)
and kha.input.Keyboard.get().notify(...);
the optional callbacks in the ToolkitOptions are used (un)subscribe listeners for these events now. By default, the implementation will fall back to using the old behavior if the callbacks are not provided. So it's possible to hook into the event system now in case i don't want haxeui to receive input events for some reason.
Ah, OK, gotcha... I think i remember seeing something similar in ZUI... thanks! Will merge.
Zui has the ability to inject the events directly i.e. you call Zui.onMouseDown/Up/Move() by hand. But there were a lot of place in haxeui where you (un)listen to the events, so this was the easier way to get it done. If my usecases become more complicated i might think about implementing them differently, but for now this will do :sweat_smile:
autoNotifyInput
wasn't implemented, so i removed it and added a way to actually inject the input :smiley: