the HUD can be toggled with F12 key; useful for screenshots

actorid
scrawl 13 years ago
parent dbe3cca828
commit 760f05c454

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

@ -86,6 +86,7 @@ WindowManager::WindowManager(
, mBatchCount(0)
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
, mHudEnabled(true)
{
// Set up the GUI system
@ -875,3 +876,9 @@ bool WindowManager::getSubtitlesEnabled ()
{
return mSubtitlesEnabled;
}
void WindowManager::toggleHud ()
{
mHudEnabled = !mHudEnabled;
mHud->setVisible (mHudEnabled);
}

@ -162,6 +162,7 @@ namespace MWGui
virtual void showCrosshair(bool show);
virtual bool getSubtitlesEnabled();
virtual void toggleHud();
virtual void disallowMouse();
virtual void allowMouse();
@ -223,6 +224,7 @@ namespace MWGui
bool mCrosshairEnabled;
bool mSubtitlesEnabled;
bool mHudEnabled;
/// \todo get rid of this stuff. Move it to the respective UI element classes, if needed.
// Various stats about player as needed by window manager

@ -226,6 +226,9 @@ namespace MWInput
case A_QuickKeysMenu:
showQuickKeysMenu();
break;
case A_ToggleHUD:
mWindows.toggleHud();
break;
}
}
}
@ -676,6 +679,7 @@ namespace MWInput
defaultKeyBindings[A_QuickKey9] = OIS::KC_9;
defaultKeyBindings[A_QuickKey10] = OIS::KC_0;
defaultKeyBindings[A_Screenshot] = OIS::KC_SYSRQ;
defaultKeyBindings[A_ToggleHUD] = OIS::KC_F12;
std::map<int, int> defaultMouseButtonBindings;
defaultMouseButtonBindings[A_Inventory] = OIS::MB_Right;

@ -234,6 +234,8 @@ namespace MWInput
A_QuickKeysMenu,
A_ToggleHUD,
A_Last // Marker for the last item
};
};

Loading…
Cancel
Save