toggleGui renamed to toggleHud, remove unused variable

new-script-api
scrawl 7 years ago
parent be19f51013
commit ad4b91131f

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

@ -190,7 +190,6 @@ namespace MWGui
, mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI"))
, mWerewolfOverlayEnabled(Settings::Manager::getBool ("werewolf overlay", "GUI"))
, mHudEnabled(true)
, mGuiEnabled(true)
, mCursorVisible(true)
, mPlayerName()
, mPlayerRaceId()
@ -450,7 +449,7 @@ namespace MWGui
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);
@ -598,8 +597,8 @@ namespace MWGui
bool loading = (getMode() == GM_Loading || getMode() == GM_LoadingWallpaper);
mHud->setVisible(mHudEnabled && mGuiEnabled && !loading);
mToolTips->setVisible(mGuiEnabled && !loading);
mHud->setVisible(mHudEnabled && !loading);
mToolTips->setVisible(mHudEnabled && !loading);
bool gameMode = !isGuiMode();
@ -1477,11 +1476,11 @@ namespace MWGui
return mSubtitlesEnabled;
}
bool WindowManager::toggleGui()
bool WindowManager::toggleHud()
{
mGuiEnabled = !mGuiEnabled;
mHudEnabled = !mHudEnabled;
updateVisible();
return mGuiEnabled;
return mHudEnabled;
}
bool WindowManager::getRestEnabled()

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

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

@ -209,7 +209,7 @@ namespace MWScript
public:
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");
if (!state)

Loading…
Cancel
Save