Artic_Ice83
05-10-2008 09:36:38
Hi!
i've seen the wiki and followed the first two tutorials, so i've added an event handler to the button and then specified the function:
but the compiler gives me an error in the line of the casting, telling me "cannot use 'dynamic_cast' to convert from 'const QuickGUI::EventArgs' to 'QuickGUI::MouseEventArgs &'".
what is wrong?
i've seen the wiki and followed the first two tutorials, so i've added an event handler to the button and then specified the function:
void myFunction (const QuickGUI::EventArgs &args)
{
const QuickGUI::MouseEventArgs& mea = dynamic_cast<QuickGUI::MouseEventArgs&>(args);
if(mea.button == QuickGUI::MB_Left)
{
mFrameListener->exit();
}
}
but the compiler gives me an error in the line of the casting, telling me "cannot use 'dynamic_cast' to convert from 'const QuickGUI::EventArgs' to 'QuickGUI::MouseEventArgs &'".
what is wrong?