SFML community forums

Help => Window => Topic started by: dalhome3 on August 03, 2016, 08:26:15 am

Title: Save current Events
Post by: dalhome3 on August 03, 2016, 08:26:15 am
Hey,  :)

I'm currently working on a project with a friend and we are both stumped on how we could remember what methods are currently being fired in events. I'm wondering if anyone knows a way to save all the current event methods into an array or delegate variables so that we can switch between two sets of event methods quickly.

The problem with just hard coding the methods is that we don't know what the other methods may be as we are working on an engine so the methods can be user specified.

Thanks
Title: AW: Save current Events
Post by: eXpl0it3r on August 03, 2016, 03:17:06 pm
Ideally you'd probably want something like a message bus, but if you just want some callbacks, you could use a std::function object.