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

Author Topic: gwen OnPress.Add ( callback function)  (Read 951 times)

0 Members and 1 Guest are viewing this topic.

pPoint

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
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);

 

anything