Have you seen on this forum the number of people who retrieve the key code after a mouse move event (for example)?
Ahaa, you are thinking this from general usage perspective.
I instead thought this from my usage perspective, where when I have "KeyHandler" function, I'am supposed to access the key data and ignore other union members.
To get rid of this thing you pointed above, change that event structure from unions to inheritance. Then when user gets keypress event, he has to downcast it to proper class.
Though this would be more complicated to use because of dynamic_casts :lol:
But anyhow, just adding that "event count" would allow both ways
Hey, why don't you use a void* parameter? This way you won't have to update your code, even if SFML switches to something else than sf::Event :wink:
:shock:
Scary