mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
fix skill progress bar v2
both widgets display their own progess indicator. it was being set for value (when you hovered over the level of your skill, eg the "5" in "Acrobatics 5"), but not for the name. this fixes that, but the progress information is being stored/displayed by two different widgets for one skill
This commit is contained in:
parent
465b7361e1
commit
7960d5a9a7
@ -237,8 +237,10 @@ namespace MWGui
|
||||
nameWidget->setSize(nameWidget->getWidth() - (widthAfter-widthBefore), nameWidget->getHeight());
|
||||
}
|
||||
|
||||
if (value.getBase() < 100)
|
||||
if (value.getBase() < 100) {
|
||||
setSkillProgress(nameWidget, value.getProgress(), parSkill);
|
||||
setSkillProgress(valueWidget, value.getProgress(), parSkill);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,19 +338,16 @@ namespace MWMechanics
|
||||
}
|
||||
}
|
||||
|
||||
bool updateSkills = false;
|
||||
//Loop over ESM::Skill::SkillEnum
|
||||
for(int i = 0; i < ESM::Skill::Length; ++i)
|
||||
{
|
||||
if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty)
|
||||
{
|
||||
updateSkills = true;
|
||||
mWatchedSkills[i] = stats.getSkill(i);
|
||||
winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i));
|
||||
}
|
||||
}
|
||||
|
||||
if (updateSkills) { winMgr->updateSkillArea(); }
|
||||
winMgr->setValue("level", stats.getLevel());
|
||||
|
||||
mWatchedStatsEmpty = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user