Changing Schemes
Posted: Mon Nov 14, 2005 14:18
Hello everyone. I've made a lot of progress to learning CEGUI for these past days but a concern popped up. How do I change schemes in CEGUI to facilitate screen changes? Right now I have a scheme file for my project's main menu and another for a loading screen. This is how my concept works. The main menu scheme has four buttons: new game, load game, options and exit. Suppose you click the load game button, the load screen scheme and its layout should show and the main menu hidden or unloaded somewhat. I have the following code segment in my screen transition:
LoadScreen::setupStuff()
{
:
// Works fine up to this point.
CEGUI::SchemeManager::getSingleton().unloadScheme((CEGUI::utf8*)"MainMenu.scheme");
// This cracks my code when it runs!
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"LoadScreen.scheme");
:
}
Yes, whenever I unload a scheme then load a new one, my app breaks down. I read the documentation to take precautions but I can't pinpoint where it happens internally.
By the way, I'm still using the Ogre3D + CEGUI version 3 in my linux box. Both schemes use TaharezLook. I hope any of you can help me on this one. I think it's possible to do transitions with layouts but what if I have some different set of buttons for the Main Menu scheme and for the Load Screen? At the moment, both screens have their own layout file, scheme file and imagesets.
Advance thanks.
LoadScreen::setupStuff()
{
:
// Works fine up to this point.
CEGUI::SchemeManager::getSingleton().unloadScheme((CEGUI::utf8*)"MainMenu.scheme");
// This cracks my code when it runs!
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"LoadScreen.scheme");
:
}
Yes, whenever I unload a scheme then load a new one, my app breaks down. I read the documentation to take precautions but I can't pinpoint where it happens internally.
By the way, I'm still using the Ogre3D + CEGUI version 3 in my linux box. Both schemes use TaharezLook. I hope any of you can help me on this one. I think it's possible to do transitions with layouts but what if I have some different set of buttons for the Main Menu scheme and for the Load Screen? At the moment, both screens have their own layout file, scheme file and imagesets.
Advance thanks.