Thanks for the help, but the solution in the forum thread produces an error. the problem is that in the same event handler Im managing 10 buttons, so, this is the code:
Code: Select all
bool gsGame::slots_OnClick(const CEGUI::EventArgs &args)
{
CEGUI::String buttonName = static_cast<const CEGUI::WindowEventArgs&>(args).window->getName();
const CEGUI::MouseEventArgs& args = reinterpret_cast<const CEGUI::MouseEventArgs&>(args);
if (buttonName=="slot1") { //execute action associated to slot
***
I get an error at "const CEGUI::MouseEventArgs& args = " saying
/home/roger/projects/ark-rpg/trunk/ark-rpg/src/gsGame.cpp|615|error: declaration of ‘const CEGUI::MouseEventArgs& args’ shadows a parameter|
Is there some way to solve this other than creating 10 different event handlers?