mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-24 02:39:42 +00:00
Fixed dynamic stats tooltips in review menu
This commit is contained in:
parent
df3b4fe6a5
commit
90d90b6d81
1 changed files with 15 additions and 6 deletions
|
@ -160,22 +160,31 @@ namespace MWGui
|
||||||
|
|
||||||
void ReviewDialog::setHealth(const MWMechanics::DynamicStat<float>& value)
|
void ReviewDialog::setHealth(const MWMechanics::DynamicStat<float>& value)
|
||||||
{
|
{
|
||||||
mHealth->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
|
int current = std::max(0, static_cast<int>(value.getCurrent()));
|
||||||
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
int modified = static_cast<int>(value.getModified());
|
||||||
|
|
||||||
|
mHealth->setValue(current, modified);
|
||||||
|
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
|
||||||
mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr);
|
mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReviewDialog::setMagicka(const MWMechanics::DynamicStat<float>& value)
|
void ReviewDialog::setMagicka(const MWMechanics::DynamicStat<float>& value)
|
||||||
{
|
{
|
||||||
mMagicka->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
|
int current = std::max(0, static_cast<int>(value.getCurrent()));
|
||||||
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
int modified = static_cast<int>(value.getModified());
|
||||||
|
|
||||||
|
mMagicka->setValue(current, modified);
|
||||||
|
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
|
||||||
mMagicka->setUserString("Caption_HealthDescription", "#{sMagDesc}\n" + valStr);
|
mMagicka->setUserString("Caption_HealthDescription", "#{sMagDesc}\n" + valStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReviewDialog::setFatigue(const MWMechanics::DynamicStat<float>& value)
|
void ReviewDialog::setFatigue(const MWMechanics::DynamicStat<float>& value)
|
||||||
{
|
{
|
||||||
mFatigue->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
|
int current = std::max(0, static_cast<int>(value.getCurrent()));
|
||||||
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
int modified = static_cast<int>(value.getModified());
|
||||||
|
|
||||||
|
mFatigue->setValue(current, modified);
|
||||||
|
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
|
||||||
mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr);
|
mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue