Suppouse that I subscribe my events into a single handler function
Code: Select all
subscribeEvent("Window/MyWin", Window::EventActivated, Event::Subscriber(&WindowDemo::EventHandler, this));
subscribeEvent("Window/MyWin", Window::EventAlphaChanged, Event::Subscriber(&WindowDemo::EventHandler, this));
subscribeEvent("Window/MyWin", Window::EventCharacterKey, Event::Subscriber(&WindowDemo::EventHandler, this));
How can I retrieve the information about which event fired the handler

Code: Select all
bool WindowDemo::EventHandler(const CEGUI::EventArgs& cEventArgs)
{
Event <- cEventArgs ???? SOME HOW ????
...
if (Event == Window::EventActivated)
// Code dealing with EventActivated event
if (Event == Window::EventAlphaChanged)
// Code dealing with EventAlphaChanged event
if (Event == Window::EventCharacterKey)
// Code dealing with EventCharacterKey event
...
}
I really need to use only one callback.
So far I realize that is not possible achieve such thing
