When I click a button i need to pass a string to the button-click event handler, so I defined a class derived from EventArgs (named MeshSelectedEventArgs) that contains that string.
How can I pass the object of MeshSelectEventArgs type to the event handler?
Here is the class:
Code: Select all
class MeshSelectEventArgs : public CEGUI::EventArgs
{
public:
string m_meshName;
};
This code and event handler works only for standard EventArgs
Code: Select all
...
pMenuItem->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&CApplication::handleMeshSelect, this));
...
...
bool CApplication::handleMeshSelect(const CEGUI::EventArgs& e)
{
...
return true;
}
...
Thanks in advance.

