Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
Save current Events
Print
Pages: [
1
]
Author
Topic: Save current Events (Read 2140 times)
0 Members and 1 Guest are viewing this topic.
dalhome3
Newbie
Posts: 3
Save current Events
«
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
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11030
AW: Save current Events
«
Reply #1 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.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
Save current Events
anything