From 2eb15d389f85e300cb124b990ebbf2663acaa637 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Jul 2013 15:48:02 +0300 Subject: add support for drag and drop from/to shortcuts window. --- src/gui/skilldialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/skilldialog.cpp') diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index d6fc3656c..0653a5e0d 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -168,6 +168,7 @@ class SkillListBox final : public ListBox if (!skill) return; dragDrop.dragSkill(skill, DRAGDROP_SOURCE_SKILLS); + dragDrop.setItem(skill->id + SKILL_MIN_ID); } ListBox::mouseDragged(event); } @@ -609,6 +610,11 @@ SkillInfo* SkillDialog::getSkill(const int id) return mSkills[id]; } +SkillInfo* SkillDialog::getSkillByItem(const int itemId) +{ + return mSkills[itemId - SKILL_MIN_ID]; +} + void SkillDialog::widgetResized(const gcn::Event &event) { Window::widgetResized(event); -- cgit v1.2.3-70-g09d2