mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:15:31 +00:00
Add more information on mouse over level
This commit is contained in:
parent
a3dfdde9ef
commit
6bfdf0e57f
4 changed files with 22 additions and 0 deletions
|
@ -335,6 +335,15 @@ namespace MWGui
|
|||
{
|
||||
int max = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("iLevelUpTotal")->mValue.getInteger();
|
||||
getWidget(levelWidget, i==0 ? "Level_str" : "LevelText");
|
||||
|
||||
std::string detail;
|
||||
for (int i = 0; i < ESM::Attribute::Length; ++i)
|
||||
{
|
||||
if (auto increase = PCstats.getLevelUpAttributeIncrease(i))
|
||||
detail += (detail.empty() ? "" : "\n") + ESM::Attribute::sAttributeNames[i] + " x" + MyGUI::utility::toString(increase);
|
||||
}
|
||||
if (!detail.empty())
|
||||
levelWidget->setUserString("Caption_LevelDetailText", detail);
|
||||
levelWidget->setUserString("RangePosition_LevelProgress", MyGUI::utility::toString(PCstats.getLevelProgress()));
|
||||
levelWidget->setUserString("Range_LevelProgress", MyGUI::utility::toString(max));
|
||||
levelWidget->setUserString("Caption_LevelProgressText", MyGUI::utility::toString(PCstats.getLevelProgress()) + "/"
|
||||
|
|
|
@ -322,6 +322,11 @@ void MWMechanics::NpcStats::updateHealth()
|
|||
setHealth(floor(0.5f * (strength + endurance)));
|
||||
}
|
||||
|
||||
int MWMechanics::NpcStats::getLevelUpAttributeIncrease(int attribute) const
|
||||
{
|
||||
return mSkillIncreases[attribute];
|
||||
}
|
||||
|
||||
int MWMechanics::NpcStats::getLevelupAttributeMultiplier(int attribute) const
|
||||
{
|
||||
int num = mSkillIncreases[attribute];
|
||||
|
|
|
@ -87,6 +87,8 @@ namespace MWMechanics
|
|||
|
||||
int getLevelProgress() const;
|
||||
|
||||
int getLevelUpAttributeIncrease(int attribute) const;
|
||||
|
||||
int getLevelupAttributeMultiplier(int attribute) const;
|
||||
|
||||
int getSkillIncreasesForSpecialization(int spec) const;
|
||||
|
|
|
@ -267,6 +267,12 @@
|
|||
<Property key="TextAlign" value="HCenter Top"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" position="0 0 0 0" align="Left Top" name="LevelDetailText">
|
||||
<Property key="AutoResize" value="true"/>
|
||||
<Property key="MultiLine" value="true"/>
|
||||
<Property key="Shrink" value="true"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<!-- Birthsign tooltip -->
|
||||
|
|
Loading…
Reference in a new issue