Extend HUD::clear()

pull/1481/head
scrawl 7 years ago
parent f6c227b966
commit 222defc6d8

@ -632,6 +632,13 @@ namespace MWGui
mEnemyHealthTimer = -1;
}
void HUD::clear()
{
unsetSelectedSpell();
unsetSelectedWeapon();
resetEnemy();
}
void HUD::customMarkerCreated(MyGUI::Widget *marker)
{
marker->eventMouseButtonClick += MyGUI::newDelegate(this, &HUD::onMapClicked);

@ -58,7 +58,7 @@ namespace MWGui
void setEnemy(const MWWorld::Ptr& enemy);
void resetEnemy();
void clear() { resetEnemy(); }
void clear();
private:
MyGUI::ProgressBar *mHealth, *mMagicka, *mStamina, *mEnemyHealth, *mDrowning;

@ -506,16 +506,9 @@ namespace MWGui
disallowAll();
delete mCharGen;
mCharGen = new CharacterCreation(mViewer->getSceneData()->asGroup(), mResourceSystem);
mGuiModes.clear();
MWBase::Environment::get().getInputManager()->changeInputMode(false);
mHud->unsetSelectedWeapon();
mHud->unsetSelectedSpell();
unsetForceHide(GW_ALL);
}
else
allow(GW_ALL);
mRestAllowed = !newgame;
}
WindowManager::~WindowManager()
@ -1338,6 +1331,7 @@ namespace MWGui
void WindowManager::disallowAll()
{
mAllowed = GW_None;
mRestAllowed = false;
mBookWindow->setInventoryAllowed (false);
mScrollWindow->setInventoryAllowed (false);
@ -1588,6 +1582,7 @@ namespace MWGui
mCustomMarkers.clear();
mForceHidden = GW_None;
mRestAllowed = true;
while (!mGuiModes.empty())
popGuiMode();

Loading…
Cancel
Save