1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00

Correct tooltip for maxed out skills

This commit is contained in:
MiroslavR 2014-08-16 13:30:49 +02:00
parent 236eec3d89
commit 063b40a0ee
2 changed files with 29 additions and 8 deletions

View File

@ -403,9 +403,24 @@ namespace MWGui
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Caption_SkillDescription", skill->mDescription);
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Caption_SkillAttribute", "#{sGoverningAttribute}: #{" + attr->mName + "}");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("ImageTexture_SkillImage", icon);
if (base < 100)
{
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillMaxed", "false");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillMaxed", "true");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillProgressVBox", "true");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillProgressVBox", "false");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Caption_SkillProgressText", boost::lexical_cast<std::string>(progressPercent)+"/100");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Range_SkillProgress", "100");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("RangePosition_SkillProgress", boost::lexical_cast<std::string>(progressPercent));
} else {
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillMaxed", "true");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillMaxed", "false");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillProgressVBox", "false");
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillProgressVBox", "true");
}
}
mSkillWidgetMap[skillId] = widget;

View File

@ -134,6 +134,11 @@
<Property key="TextAlign" value="Left Top"/>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" position="8 48 284 18" align="Left Bottom" name="SkillMaxed">
<Property key="Caption" value="#{sSkillMaxReached}"/>
<Property key="TextAlign" value="Center"/>
</Widget>
<Widget type="VBox" name="SkillProgressVBox">
<Widget type="AutoSizedTextBox" skin="NormalText" position="8 48 284 18" align="Left Bottom">
<Property key="Caption" value="#{sSkillProgress}"/>
<Property key="TextAlign" value="Center"/>
@ -145,6 +150,7 @@
</Widget>
</Widget>
</Widget>
</Widget>
<!-- Skill tooltip (without progress bar) -->
<Widget type="VBox" skin="HUD_Box_NoTransp" position="0 0 300 52" align="Stretch" name="SkillNoProgressToolTip">