I am trying to detect on which frameWindow I have to close when the close button is pressed...
Here is my code :
Code: Select all
PopUp = (FrameWindow*)Wmgr->createWindow ("TaharezLook/FrameWindow");
MenuBackground->addChildWindow(PopUp);
PopUp->setMinSize(UVector2(UDim(0,200),UDim(0,100)));
PopUp->setText("Error");
PopUp->setCloseButtonEnabled(true);
PopUp->subscribeEvent(
CEGUI::FrameWindow::EventCloseClicked,
CEGUI::Event::Subscriber(&GuiApplication::handleWindowClose, this));
And the close function :
Code: Select all
bool handleWindowClose(const CEGUI::EventArgs& e)
{
MenuBackground->removeChildWindow(PopUp);
return true;
}
Thanks