Anybody got sparing code for the Close Window procedure ?
Here is the code I'm working on:
Code: Select all
//=============================================================================
//=============================================================================
bool Gui::createWindow(const CEGUI::EventArgs& e)
{
printf("Hello Callback\n");
CEGUI::FrameWindow * frameWindow = CreateFrameWindow("", mRootWindow, "WindowsLook/FrameWindow");
frameWindow->getCloseButton()->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&Gui::closeWindow, this));
CEGUI::Window * picture = CreatePicture("", "BackgroundImage", frameWindow);
picture->setPosition(CEGUI::UVector2(cegui_reldim(0.0f), cegui_reldim(0.0f)));
picture->setSize(CEGUI::UVector2(cegui_reldim(1.0f), cegui_reldim(1.0f)));
return true;
}
//=============================================================================
//=============================================================================
bool Gui::closeWindow(const CEGUI::EventArgs& e)
{
printf("Closing window\n");
return true;
}
So far here is mine, I need to close the affiliated window in closeWindow function.
Thanks.