summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-22 19:16:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-22 19:25:44 +0300
commit09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df (patch)
tree4d6667c430fa75dd020a0c55272c4a110cfce841 /src/gui
parentc10c3b3e5ae49719a6f52873b003ef2643df3e60 (diff)
downloadplus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.gz
plus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.bz2
plus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.xz
plus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.zip
Add chat command /selectskilllevel for select skill level in skills dialog.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/skilldialog.cpp13
-rw-r--r--src/gui/windows/skilldialog.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index bcc023731..49b89c951 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -831,3 +831,16 @@ void SkillDialog::slowLogic()
}
}
}
+
+void SkillDialog::selectSkillLevel(const int skillId,
+ const int level)
+{
+ SkillInfo *const info = getSkill(skillId);
+ if (!info)
+ return;
+ if (level > info->level)
+ info->selectedLevel = info->level;
+ else
+ info->selectedLevel = level;
+ info->update();
+}
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 1e5740f58..47458e2db 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -147,6 +147,9 @@ class SkillDialog final : public Window,
SkillData *getSkillDataByLevel(const int id,
const int level) const;
+ void selectSkillLevel(const int skillId,
+ const int level);
+
private:
void addSkillDuration(SkillInfo *const skill);