Compile time errors about subscribeEvent[solved]
Posted: Thu Dec 21, 2006 17:12
Sorry for my poor English
Here is the code related to the errors
and here is the error infos.
\my documents\visual studio projects\chinesechess\introstate.cpp(29): error C2661: 'CEGUI::SubscriberTemplate<Ret,Args>::__ctor' : no overloaded function takes 2 arguments
with
[
Ret=bool,
Args=const CEGUI::EventArgs &
]
and
[
Ret=bool,
Args=const CEGUI::EventArgs &
]
I use the version that shiped with OGRE 1.24.
Here is the code related to the errors
Code: Select all
CEGUI::StaticImage* backGround = static_cast<CEGUI::StaticImage*> (CEGUI::WindowManager::getSingleton().getWindow("Root/background"));
CEGUI::ImagesetManager::getSingleton().createImagesetFromImageFile("BackgroundImage", "start.jpg");
backGround->setProperty("FrameEnabled", "false");
backGround->setProperty("BackgroundEnabled", "false");
backGround->setProperty("Image", "set:BackgroundImage image:full_image");
CEGUI::PushButton* btnStart =static_cast<CEGUI::PushButton*>(CEGUI::WindowManager::getSingleton().getWindow("menu/btnStart"));
CEGUI::PushButton* btnQuit =static_cast<CEGUI::PushButton*>(CEGUI::WindowManager::getSingleton().getWindow("menu/btnQuit"));
btnStart->subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&IntroState::btnQuitHandler, this));
btnQuit->subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&IntroState::btnQuitHandler, this));
and here is the error infos.
\my documents\visual studio projects\chinesechess\introstate.cpp(29): error C2661: 'CEGUI::SubscriberTemplate<Ret,Args>::__ctor' : no overloaded function takes 2 arguments
with
[
Ret=bool,
Args=const CEGUI::EventArgs &
]
and
[
Ret=bool,
Args=const CEGUI::EventArgs &
]
I use the version that shiped with OGRE 1.24.