flamendless / Slab

An immediate mode GUI for the Love2D framework.
MIT License
286 stars 25 forks source link

Enable forwarding input events manually. #144

Closed pirogronian closed 1 year ago

pirogronian commented 1 year ago

Enable forwarding events manually and option to not intercept event handlers by Slab. It can be usefull if handlers are altered by other code for some reason.

flamendless commented 1 year ago

Thanks for the PR. Checking on mobile so it's possible that I may miss something. I'll request some minor changes. Slab.Initialize should explicitly have the DontInterceptHandlers parameter (2nd parameter). Default logic if no 2nd param passed (nil or false) is to do the manual forwarding.

pirogronian commented 1 year ago

Default logic if no 2nd param passed (nil or false) is to do the manual forwarding.

Are you sure about that? It will break backward compatibility, as legacy behaviour is to intercept handlers automatically.

flamendless commented 1 year ago

Oh wait yeah. Keep backwards compatibility, I'll adjust it for the v1.0.0 instead since that will have breaking changes