1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Fix HUD cleanup from main menu

This commit is contained in:
Andrei Kortunov 2023-11-16 16:35:54 +04:00
parent edd69885ce
commit 1440bcaf2a
2 changed files with 18 additions and 8 deletions

View File

@ -650,17 +650,28 @@ namespace MWGui
updateEnemyHealthBar();
}
void HUD::resetEnemy()
void HUD::clear()
{
mEnemyActorId = -1;
mEnemyHealthTimer = -1;
}
void HUD::clear()
{
unsetSelectedSpell();
unsetSelectedWeapon();
resetEnemy();
mWeaponSpellTimer = 0.f;
mWeaponName = std::string();
mSpellName = std::string();
mWeaponSpellBox->setVisible(false);
mWeapStatus->setProgressRange(100);
mWeapStatus->setProgressPosition(0);
mSpellStatus->setProgressRange(100);
mSpellStatus->setProgressPosition(0);
mWeapImage->setItem(MWWorld::Ptr());
mWeapImage->setIcon(std::string());
mSpellImage->setItem(MWWorld::Ptr());
mSpellImage->setIcon(std::string());
mWeapBox->clearUserStrings();
mSpellBox->clearUserStrings();
}
void HUD::customMarkerCreated(MyGUI::Widget* marker)

View File

@ -58,7 +58,6 @@ namespace MWGui
MyGUI::Widget* getEffectBox() { return mEffectBox; }
void setEnemy(const MWWorld::Ptr& enemy);
void resetEnemy();
void clear() override;