diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-23 20:15:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-23 20:15:42 +0300 |
commit | 06ffa695ca77de549520fa03c500c7d88f21c0c4 (patch) | |
tree | 0a7f3e1ba617393655295e7b50e6aa19eb967ded /src | |
parent | 0cb2889cdef920918d3697fad42f83e83602d630 (diff) | |
download | manaverse-06ffa695ca77de549520fa03c500c7d88f21c0c4.tar.gz manaverse-06ffa695ca77de549520fa03c500c7d88f21c0c4.tar.bz2 manaverse-06ffa695ca77de549520fa03c500c7d88f21c0c4.tar.xz manaverse-06ffa695ca77de549520fa03c500c7d88f21c0c4.zip |
Add field errorText into skills.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/skillinfo.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/skillinfo.h | 1 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 10 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp index 514555631..36ae85de9 100644 --- a/src/gui/widgets/skillinfo.cpp +++ b/src/gui/widgets/skillinfo.cpp @@ -40,6 +40,7 @@ SkillInfo::SkillInfo() : skillExp(), skillEffect(), useButton(), + errorText(), progress(0.0F), color(), dataMap(), diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h index d15d0fe97..c67e055e0 100644 --- a/src/gui/widgets/skillinfo.h +++ b/src/gui/widgets/skillinfo.h @@ -48,6 +48,7 @@ struct SkillInfo final std::string skillExp; std::string skillEffect; std::string useButton; + std::string errorText; float progress; Color color; SkillDataMap dataMap; diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index d08ee4d1a..1fb07e37d 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -306,6 +306,10 @@ void SkillDialog::loadXmlFile(const std::string &fileName) id += SKILL_VAR_MIN_ID; } + std::string name = XML::langProperty(node, "name", + // TRANSLATORS: skills dialog. skill id + strprintf(_("Skill %d"), id)); + SkillInfo *skill = getSkill(id); if (!skill) { @@ -319,13 +323,12 @@ void SkillDialog::loadXmlFile(const std::string &fileName) node, "useButton", _("Use")); skill->owner = parseOwner(XML::getProperty( node, "owner", "player")); + skill->errorText = XML::getProperty( + node, "errorText", name); model->addSkill(skill); mSkills[id] = skill; } - std::string name = XML::langProperty(node, "name", - // TRANSLATORS: skills dialog. skill id - strprintf(_("Skill %d"), id)); std::string icon = XML::getProperty(node, "icon", ""); const int level = XML::getProperty(node, "level", 0); SkillData *data = skill->getData(level); @@ -445,6 +448,7 @@ void SkillDialog::addSkill(const SkillOwner::Type owner, skill->sp = sp; skill->update(); skill->useButton = _("Use"); + skill->errorText = name; mDefaultModel->addSkill(skill); mSkills[id] = skill; |