floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.93k stars 487 forks source link

sokol_nuklear.h: how to know if nuklear handled an event #958

Closed adamrt closed 9 months ago

adamrt commented 9 months ago

Hi is there a standard way to know if nuklear handled an event in the same way we can with imgui? void snk_handle_event(const sapp_event* ev); doesn't return anything and the state is isn't public. I have some ideas for a patch but wanted to make sure that I wasn't missing something obvious.

Thank you for such a rad library.

floooh commented 9 months ago

Yeah you're right, there currently isn't a way to check. If you have an idea I'm open for a PR :)

(I think it's ok to just add a bool return value to the existing snk_handle_event() function, since existing code would still compile and work)

adamrt commented 9 months ago

PR: https://github.com/floooh/sokol/pull/959

floooh commented 9 months ago

Closing as fixed since PR #959 has been merged.