I am working on building a menu for a game. So, in my "main", I have:
-start game
-options
-quit
In my "options" I have:
-Return to menu
in my main.cpp, I used:
Code: Select all
CEGUI::Window* pOptions = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"options.layout");
Options* pOpt = new Options(pOptions, sim);
CEGUI::Window* pMain = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"katana.layout");
MainMenuDlg* pDlg = new MainMenuDlg(pMain, sim);
to create the windows, and this
Code: Select all
CEGUI::System::getSingleton().setGUISheet(pMain);for using them.
I'm trying to find a way of going from "main" to "options" and the vice-versa(I only have to setGUISheet() right?). In my main loop, I only have handler->capture (to capture IOS events) and a ogre->renderOneFrame().
In PracticalApp_CEGUI (from Xavier), there is a simulator class that controls in which part of the game the simulation is:
Code: Select all
typedef enum {
STARTUP,
GUI,
OPTIONS, (I added this)
LOADING,
CANCEL_LOADING,
SIMULATION,
SHUTDOWN
} SimulationState;
What I'm asking is if is this the standard approach, using this simulationState to navigate trough the different windows of my menu, or this simulation state is for more general things like (GUI, Loading, Simulation, etc)? If not, what is the standard approach or where can I find it?
Thanks,
littlepig
