diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-15 16:43:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-15 16:43:19 +0300 |
commit | ac9f689d24e754a181dcb9f8537c50e57d608c35 (patch) | |
tree | 2dc265579db10891611d855ef926856a95175127 /src/gui/windows/skilldialog.cpp | |
parent | 2ea0e67f1fac993f8bc175c1a1bcef8fbdadef74 (diff) | |
download | plus-ac9f689d24e754a181dcb9f8537c50e57d608c35.tar.gz plus-ac9f689d24e754a181dcb9f8537c50e57d608c35.tar.bz2 plus-ac9f689d24e754a181dcb9f8537c50e57d608c35.tar.xz plus-ac9f689d24e754a181dcb9f8537c50e57d608c35.zip |
Add useButton option to skills.xml.
This allow to change use button for different skills.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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")); } } } |