subscribeEvent() problem
Posted: Mon Aug 05, 2013 07:53
Hi,
I found some topics talking about subscribeEvent() in this forum, but I didn't understand where my problem was... So I create a new one.
I'm starting using CEGUI 0.7.9 with Ogre, following a french tutorial.
I implemented all my CEGUI code in a class called "InputListener", and I created the quit() function :
Also, I created a "Quit" button in my scene. I want to call the subscribeEvent() function, also in my InputListener class, and I wrote it like the tutorial said :
Unfortunately, I have this error message :
So I tried to delete the "this" argument, and it said :
I am at a loss... What can I do to fix those errors ?
I found some topics talking about subscribeEvent() in this forum, but I didn't understand where my problem was... So I create a new one.
I'm starting using CEGUI 0.7.9 with Ogre, following a french tutorial.
I implemented all my CEGUI code in a class called "InputListener", and I created the quit() function :
Code: Select all
bool InputListener::quit()
{
mContinue = false;
return mContinue;
}
Also, I created a "Quit" button in my scene. I want to call the subscribeEvent() function, also in my InputListener class, and I wrote it like the tutorial said :
Code: Select all
quitButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&InputListener::quit, this));
Unfortunately, I have this error message :
Code: Select all
error C2661: 'CEGUI::SubscriberSlot::SubscriberSlot' : no overloaded function takes two parameters
So I tried to delete the "this" argument, and it said :
Code: Select all
error C2064 : term does not evaluate to a function taking 'number' arguments
I am at a loss... What can I do to fix those errors ?