1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-28 08:37:12 +00:00

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

This commit is contained in:
Marc Zinnschlag 2010-07-21 10:28:58 +02:00
parent 6e3aacca08
commit a87175446c
3 changed files with 7 additions and 4 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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();
} }