diff options
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 | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp index a009d623a..683854ce8 100644 --- a/src/gui/widgets/skillinfo.cpp +++ b/src/gui/widgets/skillinfo.cpp @@ -38,6 +38,7 @@ SkillInfo::SkillInfo() : skillLevel(), skillExp(), + useButton(), progress(0.0F), color(), dataMap(), diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h index 06e3b3583..7570feca5 100644 --- a/src/gui/widgets/skillinfo.h +++ b/src/gui/widgets/skillinfo.h @@ -43,6 +43,7 @@ struct SkillInfo final { std::string skillLevel; std::string skillExp; + std::string useButton; float progress; Color color; SkillDataMap dataMap; diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index fa71386a6..f90f0a84c 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -126,6 +126,7 @@ void SkillDialog::action(const ActionEvent &event) if (const SkillInfo *const info = tab->getSelectedInfo()) { mUseButton->setEnabled(info->range > 0); + mUseButton->setCaption(info->useButton); mIncreaseButton->setEnabled(info->id < SKILL_VAR_MIN_ID); const int num = itemShortcutWindow->getTabIndex(); if (num >= 0 && num < static_cast<int>(SHORTCUT_TABS) @@ -139,6 +140,7 @@ void SkillDialog::action(const ActionEvent &event) { mUseButton->setEnabled(false); mIncreaseButton->setEnabled(false); + mUseButton->setCaption(_("Use")); } } } @@ -274,6 +276,8 @@ void SkillDialog::loadXmlFile(const std::string &fileName) skill->visible = false; skill->model = model; skill->update(); + skill->useButton = XML::getProperty( + node, "useButton", _("Use")); model->addSkill(skill); mSkills[id] = skill; } @@ -437,10 +441,12 @@ void SkillDialog::updateTabSelection() { mUseButton->setEnabled(info->range > 0); mIncreaseButton->setEnabled(info->id < SKILL_VAR_MIN_ID); + mUseButton->setCaption(info->useButton); } else { mUseButton->setEnabled(false); + mUseButton->setCaption(_("Use")); } } } |