Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pPoint

Pages: [1]
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:
Quote
no match for call to '(Gwen::Event::Caller) (Gwen::Controls::Canvas*&, void (*)(Gwen::Controls::Base*))'
     pButton->onPress(pCanvas,&OnRow);

Pages: [1]