From 3fc421539bc81f27262b91554694509f3e47f865 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Aug 2016 20:23:15 +0300 Subject: Show cast type in skill popup from custom place. For skill shortcuts for now it always "Default". --- src/gui/widgets/itemshortcutcontainer.cpp | 10 +++++++++- src/gui/widgets/skilllistbox.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 9604d33d8..7b6df7644 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -594,8 +594,16 @@ void ItemShortcutContainer::mouseMoved(MouseEvent &event) if (!skill) return; + // +++ for now from data only get cast type + const std::string data = selShortcut->getItemData(index); + CastTypeT castType = CastType::Default; + if (!data.empty()) + { + castType = static_cast(atoi(data.c_str())); + } skillPopup->show(skill, - toInt(itemColor, int)); + toInt(itemColor, int), + castType); skillPopup->position(viewport->mMouseX, viewport->mMouseY); } diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h index 818dbf8cb..533d12b5e 100644 --- a/src/gui/widgets/skilllistbox.h +++ b/src/gui/widgets/skilllistbox.h @@ -200,7 +200,8 @@ class SkillListBox final : public ListBox if (!skill) return; skillPopup->show(skill, - skill->customSelectedLevel); + skill->customSelectedLevel, + skill->customCastType); skillPopup->position(viewport->mMouseX, viewport->mMouseY); } -- cgit v1.2.3-70-g09d2