Keyslam / Inky

A GUI Framework for LÖVE
MIT License
48 stars 4 forks source link

Allow all event handlers to have multiple callbacks #13

Closed steveRoll-git closed 8 months ago

steveRoll-git commented 8 months ago

At the moment, all event handlers in Inky are limited to having just one callback - calling on multiple times would just overwrite the previous one, and not add it alongside other callbacks, as on in other frameworks usually does.

This PR replaces all Callback fields with a Callbacks table. Each time on is called, the callback is inserted into the corresponding table - and whenever an event is raised, all callbacks in the table will be called.

Keyslam commented 8 months ago

Looks good to me. Thanks!