|
|
|
@ -85,7 +85,7 @@ ReviewDialog::ReviewDialog(MWWorld::Environment& environment)
|
|
|
|
|
for (int i = 0; i < ESM::Skill::Length; ++i)
|
|
|
|
|
{
|
|
|
|
|
skillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
|
|
|
|
|
skillWidgetMap.insert(std::pair<int, MyGUI::WidgetPtr>(i, nullptr));
|
|
|
|
|
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord = MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
|
|
|
|
@ -180,7 +180,7 @@ void ReviewDialog::setAttribute(ESM::Attribute::AttributeID attributeId, const M
|
|
|
|
|
void ReviewDialog::setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::Stat<float>& value)
|
|
|
|
|
{
|
|
|
|
|
skillValues[skillId] = value;
|
|
|
|
|
MyGUI::WidgetPtr widget = skillWidgetMap[skillId];
|
|
|
|
|
MyGUI::StaticTextPtr widget = skillWidgetMap[skillId];
|
|
|
|
|
if (widget)
|
|
|
|
|
{
|
|
|
|
|
float modified = value.getModified(), base = value.getBase();
|
|
|
|
@ -214,7 +214,7 @@ void ReviewDialog::configureSkills(const std::vector<int>& major, const std::vec
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ReviewDialog::setStyledText(MyGUI::WidgetPtr widget, ColorStyle style, const std::string &value)
|
|
|
|
|
void ReviewDialog::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value)
|
|
|
|
|
{
|
|
|
|
|
widget->setCaption(value);
|
|
|
|
|
if (style == CS_Super)
|
|
|
|
@ -244,7 +244,7 @@ void ReviewDialog::addGroup(const std::string &label, MyGUI::IntCoord &coord1, M
|
|
|
|
|
coord2.top += lineHeight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MyGUI::WidgetPtr ReviewDialog::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
|
|
|
|
|
MyGUI::StaticTextPtr ReviewDialog::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
|
|
|
|
|
{
|
|
|
|
|
MyGUI::StaticTextPtr skillNameWidget, skillValueWidget;
|
|
|
|
|
|
|
|
|
@ -307,7 +307,7 @@ void ReviewDialog::addSkills(const SkillList &skills, const std::string &titleId
|
|
|
|
|
style = CS_Super;
|
|
|
|
|
else if (modified < base)
|
|
|
|
|
style = CS_Sub;
|
|
|
|
|
MyGUI::WidgetPtr widget = addValueItem(wm->getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), style, coord1, coord2);
|
|
|
|
|
MyGUI::StaticTextPtr widget = addValueItem(wm->getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), style, coord1, coord2);
|
|
|
|
|
skillWidgetMap[skillId] = widget;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|