1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

GUI: update/clear force-hidden window status

This commit is contained in:
MiroslavR 2014-09-06 03:13:35 +02:00
parent c1cc66985d
commit 57f7ef1db4

View File

@ -23,6 +23,8 @@
#include "../mwworld/player.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwmechanics/npcstats.hpp"
#include "../mwsound/soundmanagerimp.hpp"
#include "console.hpp"
@ -1442,6 +1444,10 @@ namespace MWGui
void WindowManager::updatePlayer()
{
mInventoryWindow->updatePlayer();
const MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
if (player.getClass().getNpcStats(player).isWerewolf())
forceHide((GuiWindow)(MWGui::GW_Inventory | MWGui::GW_Magic));
}
void WindowManager::setKeyFocusWidget(MyGUI::Widget *widget)
@ -1532,6 +1538,8 @@ namespace MWGui
mCustomMarkers.clear();
mForceHidden = GW_None;
mGuiModes.clear();
MWBase::Environment::get().getInputManager()->changeInputMode(false);
updateVisible();