RobLoach / nuklear_console

Console-like user interface for Nuklear with gamepad, keyboard or mouse support
https://robloach.github.io/nuklear_console/
MIT License
13 stars 3 forks source link

Event System Improvements #78

Closed RobLoach closed 3 months ago

RobLoach commented 4 months ago

@brianwatling following discussion here so we don't lose it. Thoughts on this? Goal is to consolidate most event systems into just one nk_console_event_handler* events.

brianwatling commented 3 months ago

I think your suggestion to have an enum for the event type seems reasonable. That'll help reduce the API surface for event handling.

Have nk_console_event_handler* events in nk_console as a cvector for all events

Are you suggesting all events are stored in a single array that's scanned when an event is triggered? Seems like a clean approach and performance shouldn't be a concern given events are triggered relatively infrequently - so I think this is decent way to implement this