1
General / gwen OnPress.Add ( callback function)
« on: January 08, 2014, 10:40:33 pm »
Hi everyone
i'm have a problem with callback with GWEN GUI
pseudo code
void Ret_CallBack(Gwen::Controls::Base *p)
{
//some code
}
Gwen::Controls::Button *pButton = new Gwen::Controls::Button(pCanvas);
//pCanvas == SFML Window
pButton->SetText(L"CLICK ME!");
pButton->OnPress.Add(pCanvas,&_CallBack);
I'm not understand template to CallBack function
Someone can help me , upload own code /
not using UnitTest( with this classes)
sorry bad eng!
Error with GCC 4,8:
i'm have a problem with callback with GWEN GUI
pseudo code
void Ret_CallBack(Gwen::Controls::Base *p)
{
//some code
}
Gwen::Controls::Button *pButton = new Gwen::Controls::Button(pCanvas);
//pCanvas == SFML Window
pButton->SetText(L"CLICK ME!");
pButton->OnPress.Add(pCanvas,&_CallBack);
I'm not understand template to CallBack function
Someone can help me , upload own code /
not using UnitTest( with this classes)
sorry bad eng!
Error with GCC 4,8:
Quote
no match for call to '(Gwen::Event::Caller) (Gwen::Controls::Canvas*&, void (*)(Gwen::Controls::Base*))'
pButton->onPress(pCanvas,&OnRow);