toggleGui renamed to toggleHud, remove unused variable

pull/303/head
scrawl 7 years ago
parent be19f51013
commit ad4b91131f

@ -229,7 +229,7 @@ namespace MWBase
virtual void showCrosshair(bool show) = 0; virtual void showCrosshair(bool show) = 0;
virtual bool getSubtitlesEnabled() = 0; virtual bool getSubtitlesEnabled() = 0;
virtual bool toggleGui() = 0; virtual bool toggleHud() = 0;
virtual void disallowMouse() = 0; virtual void disallowMouse() = 0;
virtual void allowMouse() = 0; virtual void allowMouse() = 0;

@ -190,7 +190,6 @@ namespace MWGui
, mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI")) , mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI"))
, mWerewolfOverlayEnabled(Settings::Manager::getBool ("werewolf overlay", "GUI")) , mWerewolfOverlayEnabled(Settings::Manager::getBool ("werewolf overlay", "GUI"))
, mHudEnabled(true) , mHudEnabled(true)
, mGuiEnabled(true)
, mCursorVisible(true) , mCursorVisible(true)
, mPlayerName() , mPlayerName()
, mPlayerRaceId() , mPlayerRaceId()
@ -450,7 +449,7 @@ namespace MWGui
mInputBlocker = MyGUI::Gui::getInstance().createWidget<MyGUI::Widget>("",0,0,w,h,MyGUI::Align::Stretch,"InputBlocker"); mInputBlocker = MyGUI::Gui::getInstance().createWidget<MyGUI::Widget>("",0,0,w,h,MyGUI::Align::Stretch,"InputBlocker");
mHud->setVisible(mHudEnabled); mHud->setVisible(true);
mCharGen = new CharacterCreation(mViewer->getSceneData()->asGroup(), mResourceSystem); mCharGen = new CharacterCreation(mViewer->getSceneData()->asGroup(), mResourceSystem);
@ -598,8 +597,8 @@ namespace MWGui
bool loading = (getMode() == GM_Loading || getMode() == GM_LoadingWallpaper); bool loading = (getMode() == GM_Loading || getMode() == GM_LoadingWallpaper);
mHud->setVisible(mHudEnabled && mGuiEnabled && !loading); mHud->setVisible(mHudEnabled && !loading);
mToolTips->setVisible(mGuiEnabled && !loading); mToolTips->setVisible(mHudEnabled && !loading);
bool gameMode = !isGuiMode(); bool gameMode = !isGuiMode();
@ -1477,11 +1476,11 @@ namespace MWGui
return mSubtitlesEnabled; return mSubtitlesEnabled;
} }
bool WindowManager::toggleGui() bool WindowManager::toggleHud()
{ {
mGuiEnabled = !mGuiEnabled; mHudEnabled = !mHudEnabled;
updateVisible(); updateVisible();
return mGuiEnabled; return mHudEnabled;
} }
bool WindowManager::getRestEnabled() bool WindowManager::getRestEnabled()

@ -260,8 +260,8 @@ namespace MWGui
virtual void showCrosshair(bool show); virtual void showCrosshair(bool show);
virtual bool getSubtitlesEnabled(); virtual bool getSubtitlesEnabled();
/// Turn visibility of *all* GUI elements on or off (HUD and all windows, except the console) /// Turn visibility of HUD on or off
virtual bool toggleGui(); virtual bool toggleHud();
virtual void disallowMouse(); virtual void disallowMouse();
virtual void allowMouse(); virtual void allowMouse();
@ -468,7 +468,6 @@ namespace MWGui
bool mHitFaderEnabled; bool mHitFaderEnabled;
bool mWerewolfOverlayEnabled; bool mWerewolfOverlayEnabled;
bool mHudEnabled; bool mHudEnabled;
bool mGuiEnabled;
bool mCursorVisible; bool mCursorVisible;
void setCursorVisible(bool visible); void setCursorVisible(bool visible);

@ -289,7 +289,7 @@ namespace MWInput
showQuickKeysMenu(); showQuickKeysMenu();
break; break;
case A_ToggleHUD: case A_ToggleHUD:
MWBase::Environment::get().getWindowManager()->toggleGui(); MWBase::Environment::get().getWindowManager()->toggleHud();
break; break;
case A_ToggleDebug: case A_ToggleDebug:
MWBase::Environment::get().getWindowManager()->toggleDebugWindow(); MWBase::Environment::get().getWindowManager()->toggleDebugWindow();

@ -209,7 +209,7 @@ namespace MWScript
public: public:
virtual void execute(Interpreter::Runtime &runtime) virtual void execute(Interpreter::Runtime &runtime)
{ {
bool state = MWBase::Environment::get().getWindowManager()->toggleGui(); bool state = MWBase::Environment::get().getWindowManager()->toggleHud();
runtime.getContext().report(state ? "GUI -> On" : "GUI -> Off"); runtime.getContext().report(state ? "GUI -> On" : "GUI -> Off");
if (!state) if (!state)

Loading…
Cancel
Save