disable windows on startup when --new-game is used

actorid
Marc Zinnschlag 15 years ago
parent 6e3aacca08
commit a87175446c

@ -209,7 +209,7 @@ void OMW::Engine::go()
MWScript::registerExtensions (mExtensions); MWScript::registerExtensions (mExtensions);
mEnvironment.mWindowManager = new MWGui::WindowManager(mGuiManager->getGui(), mEnvironment, mEnvironment.mWindowManager = new MWGui::WindowManager(mGuiManager->getGui(), mEnvironment,
mExtensions); mExtensions, mNewGame);
mEnvironment.mSoundManager = new MWSound::SoundManager; mEnvironment.mSoundManager = new MWSound::SoundManager;

@ -8,8 +8,8 @@
using namespace MWGui; using namespace MWGui;
WindowManager::WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment, WindowManager::WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment,
const Compiler::Extensions& extensions) const Compiler::Extensions& extensions, bool newGame)
: gui(_gui), mode(GM_Game), shown(GW_ALL), allowed(GW_ALL) : gui(_gui), mode(GM_Game), shown(GW_ALL), allowed(newGame ? GW_None : GW_ALL)
{ {
// Get size info from the Gui object // Get size info from the Gui object
assert(gui); assert(gui);

@ -102,11 +102,14 @@ namespace MWGui
public: public:
/// The constructor needs the main Gui object /// The constructor needs the main Gui object
WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment, WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment,
const Compiler::Extensions& extensions); const Compiler::Extensions& extensions, bool newGame);
virtual ~WindowManager(); virtual ~WindowManager();
void setMode(GuiMode newMode) void setMode(GuiMode newMode)
{ {
if (newMode==GM_Inventory && allowed==GW_None)
return;
mode = newMode; mode = newMode;
updateVisible(); updateVisible();
} }

Loading…
Cancel
Save