Page 1 of 1

[Problem] Rendering more than one layout using singleton

Posted: Thu Feb 28, 2013 14:27
by pentium166
Well...I don't know how to explain it in a more precise way (sorry, english isn't my first language) so I've sent a picture of it:
Image

As you can see, it's like it's rendering more than one layout at same time! I have the lobby GUI...when I click start...I suppouse to change the gui sheet of the singleton to show my loading layout, here is the piece of code I'm using to do it:

Code: Select all

if(ListGUI[enGAMEGUI::LOADING].win)
{
CEGUI::System::getSingleton().setGUISheet(ListGUI[enGAMEGUI::LOADING].win);
}


here is the code I use to obtain the ListGUI for the enGAMEGUI::LOADING:

Code: Select all

CEGUI::Window* layroot = CURRENTGUI->loadWindowLayout("GUI\\Loading.layout","","Transparent");
if(layroot)
{
//here I got other components of the layout
...
...
ListGUI[enGAMEGUI::LOADING].win=layroot;
}




and as you can see in the picture, the same happens with the in-game GUI...the lobby still there...and also the loading still there too...it's like they're stacking in the render...
but the odd thing is...there is another two GUI's (start gui and options gui) which that doesn't happens...

So...that's it I think...can someone give me a light for this problem?