diff --git a/CHANGELOG.md b/CHANGELOG.md index d399bcb30e..6ac8168ebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ Bug #5703: OpenMW-CS menu system crashing on XFCE Bug #5731: Editor: skirts are invisible on characters Feature #390: 3rd person look "over the shoulder" + Feature #1536: Show more information about level on menu Feature #2386: Distant Statics in the form of Object Paging Feature #2404: Levelled List can not be placed into a container Feature #2686: Timestamps in openmw.log diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index 2a3e2cd85c..e02b2f45f1 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -335,6 +335,15 @@ namespace MWGui { int max = MWBase::Environment::get().getWorld()->getStore().get().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()) + "/" diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index 5d19368bf6..71453cd07c 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -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]; diff --git a/apps/openmw/mwmechanics/npcstats.hpp b/apps/openmw/mwmechanics/npcstats.hpp index 9bd8e20ad7..cab52cb281 100644 --- a/apps/openmw/mwmechanics/npcstats.hpp +++ b/apps/openmw/mwmechanics/npcstats.hpp @@ -87,6 +87,8 @@ namespace MWMechanics int getLevelProgress() const; + int getLevelUpAttributeIncrease(int attribute) const; + int getLevelupAttributeMultiplier(int attribute) const; int getSkillIncreasesForSpecialization(int spec) const; diff --git a/components/widgets/box.cpp b/components/widgets/box.cpp index 23a108ee92..3e8f62b4ba 100644 --- a/components/widgets/box.cpp +++ b/components/widgets/box.cpp @@ -32,7 +32,7 @@ namespace Gui MyGUI::IntSize AutoSizedTextBox::getRequestedSize() { - return getTextSize(); + return getCaption().empty() ? MyGUI::IntSize{0, 0} : getTextSize(); } void AutoSizedTextBox::setCaption(const MyGUI::UString& _value) diff --git a/files/mygui/openmw_tooltips.layout b/files/mygui/openmw_tooltips.layout index 70246fa4e9..59050f932b 100644 --- a/files/mygui/openmw_tooltips.layout +++ b/files/mygui/openmw_tooltips.layout @@ -267,6 +267,12 @@ + + + + + +