window:addChildWIndow()
Posted: Thu Dec 07, 2006 15:57
Hi.
I have the following function that load a specified layout.
If there is no GuiSheet active it sets the loaded window as GuiSheet.
If there already is a GuiSheet() it adds the newly loaded layout as a child to the existing.
This gives the result that:
1. Both layouts are visible
2. only the layout loaded first is possible to interact with.
Below is the function to load the layouts:
bool loadLayout(const std::string& filename)
{
CEGUI::Window* newRoot = CEGUI::WindowManager::getSingleton().loadWindowLayout(filename);
if (newRoot) {
CEGUI::Window *oldRoot = CEGUI::System::getSingleton().getGUISheet();
if (oldRoot) {
oldRoot->addChildWindow(newRoot);
}
else
CEGUI::System::getSingleton().setGUISheet(newRoot);
return true;
}
return false;
}
Could anyone point me in the right direction?
I have the following function that load a specified layout.
If there is no GuiSheet active it sets the loaded window as GuiSheet.
If there already is a GuiSheet() it adds the newly loaded layout as a child to the existing.
This gives the result that:
1. Both layouts are visible
2. only the layout loaded first is possible to interact with.
Below is the function to load the layouts:
bool loadLayout(const std::string& filename)
{
CEGUI::Window* newRoot = CEGUI::WindowManager::getSingleton().loadWindowLayout(filename);
if (newRoot) {
CEGUI::Window *oldRoot = CEGUI::System::getSingleton().getGUISheet();
if (oldRoot) {
oldRoot->addChildWindow(newRoot);
}
else
CEGUI::System::getSingleton().setGUISheet(newRoot);
return true;
}
return false;
}
Could anyone point me in the right direction?