mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 12:09:43 +00:00
Merge branch 'Show-more-information-about-level-on-menu' into 'master'
Show more information about level on menu See merge request OpenMW/openmw!437
This commit is contained in:
commit
11eff02a1d
6 changed files with 24 additions and 1 deletions
|
@ -72,6 +72,7 @@
|
||||||
Bug #5703: OpenMW-CS menu system crashing on XFCE
|
Bug #5703: OpenMW-CS menu system crashing on XFCE
|
||||||
Bug #5731: Editor: skirts are invisible on characters
|
Bug #5731: Editor: skirts are invisible on characters
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
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 #2386: Distant Statics in the form of Object Paging
|
||||||
Feature #2404: Levelled List can not be placed into a container
|
Feature #2404: Levelled List can not be placed into a container
|
||||||
Feature #2686: Timestamps in openmw.log
|
Feature #2686: Timestamps in openmw.log
|
||||||
|
|
|
@ -335,6 +335,15 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
int max = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("iLevelUpTotal")->mValue.getInteger();
|
int max = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("iLevelUpTotal")->mValue.getInteger();
|
||||||
getWidget(levelWidget, i==0 ? "Level_str" : "LevelText");
|
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("RangePosition_LevelProgress", MyGUI::utility::toString(PCstats.getLevelProgress()));
|
||||||
levelWidget->setUserString("Range_LevelProgress", MyGUI::utility::toString(max));
|
levelWidget->setUserString("Range_LevelProgress", MyGUI::utility::toString(max));
|
||||||
levelWidget->setUserString("Caption_LevelProgressText", MyGUI::utility::toString(PCstats.getLevelProgress()) + "/"
|
levelWidget->setUserString("Caption_LevelProgressText", MyGUI::utility::toString(PCstats.getLevelProgress()) + "/"
|
||||||
|
|
|
@ -322,6 +322,11 @@ void MWMechanics::NpcStats::updateHealth()
|
||||||
setHealth(floor(0.5f * (strength + endurance)));
|
setHealth(floor(0.5f * (strength + endurance)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MWMechanics::NpcStats::getLevelUpAttributeIncrease(int attribute) const
|
||||||
|
{
|
||||||
|
return mSkillIncreases[attribute];
|
||||||
|
}
|
||||||
|
|
||||||
int MWMechanics::NpcStats::getLevelupAttributeMultiplier(int attribute) const
|
int MWMechanics::NpcStats::getLevelupAttributeMultiplier(int attribute) const
|
||||||
{
|
{
|
||||||
int num = mSkillIncreases[attribute];
|
int num = mSkillIncreases[attribute];
|
||||||
|
|
|
@ -87,6 +87,8 @@ namespace MWMechanics
|
||||||
|
|
||||||
int getLevelProgress() const;
|
int getLevelProgress() const;
|
||||||
|
|
||||||
|
int getLevelUpAttributeIncrease(int attribute) const;
|
||||||
|
|
||||||
int getLevelupAttributeMultiplier(int attribute) const;
|
int getLevelupAttributeMultiplier(int attribute) const;
|
||||||
|
|
||||||
int getSkillIncreasesForSpecialization(int spec) const;
|
int getSkillIncreasesForSpecialization(int spec) const;
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Gui
|
||||||
|
|
||||||
MyGUI::IntSize AutoSizedTextBox::getRequestedSize()
|
MyGUI::IntSize AutoSizedTextBox::getRequestedSize()
|
||||||
{
|
{
|
||||||
return getTextSize();
|
return getCaption().empty() ? MyGUI::IntSize{0, 0} : getTextSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoSizedTextBox::setCaption(const MyGUI::UString& _value)
|
void AutoSizedTextBox::setCaption(const MyGUI::UString& _value)
|
||||||
|
|
|
@ -267,6 +267,12 @@
|
||||||
<Property key="TextAlign" value="HCenter Top"/>
|
<Property key="TextAlign" value="HCenter Top"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
</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>
|
</Widget>
|
||||||
|
|
||||||
<!-- Birthsign tooltip -->
|
<!-- Birthsign tooltip -->
|
||||||
|
|
Loading…
Reference in a new issue