For example, CEGUI::Window has a number of events such as: EventMouseButtonDown, EventMouseClick, EventMouseMove, etc. When I subscribe to these events, I give it a handler such as:
Code: Select all
bool foo(const CEGUI::EventArgs& args);
When I write foo, how do I know what to cast args as?
My question came about when I was trying to use MouseEventArgs for EventMouseClick but it was throwing exceptions. I looked at the demos and switched to EventMouseButtonDown instead, but I'm still curious what EventMouseClick should be using. Of course, I'm open to the possibility that I was simply doing something wrong with EventMouseClick, but I was curious how developers determine which EventArgs to use for which Events?
Thanks in advance for your time and help!