summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-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);