summaryrefslogtreecommitdiff
path: root/src/gui/popups/skillpopup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-14 20:23:15 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-14 20:23:15 +0300
commit3fc421539bc81f27262b91554694509f3e47f865 (patch)
treeb191e1de4932ddcd3fad4a6780d0308f79d68e5e /src/gui/popups/skillpopup.cpp
parent6a763f58ad8ab52b9b444b096a8f298d440e0a65 (diff)
downloadplus-3fc421539bc81f27262b91554694509f3e47f865.tar.gz
plus-3fc421539bc81f27262b91554694509f3e47f865.tar.bz2
plus-3fc421539bc81f27262b91554694509f3e47f865.tar.xz
plus-3fc421539bc81f27262b91554694509f3e47f865.zip
Show cast type in skill popup from custom place.
For skill shortcuts for now it always "Default".
Diffstat (limited to 'src/gui/popups/skillpopup.cpp')
-rw-r--r--src/gui/popups/skillpopup.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/popups/skillpopup.cpp b/src/gui/popups/skillpopup.cpp
index 4c9af3d0f..2797664dc 100644
--- a/src/gui/popups/skillpopup.cpp
+++ b/src/gui/popups/skillpopup.cpp
@@ -47,6 +47,7 @@ SkillPopup::SkillPopup() :
mSkillEffect(new TextBox(this)),
mSkillLevel(new TextBox(this)),
mSkillCastType(new TextBox(this)),
+ mCastType(CastType::Default),
mLastId(0U),
mLastLevel(-1)
{
@@ -93,18 +94,21 @@ SkillPopup::~SkillPopup()
}
void SkillPopup::show(const SkillInfo *const skill,
- const int level)
+ const int level,
+ const CastTypeT castType)
{
if (!skill ||
!skill->data ||
(skill->id == mLastId &&
- level == mLastLevel))
+ level == mLastLevel &&
+ castType == mCastType))
{
return;
}
mLastId = skill->id;
mLastLevel = level;
+ mCastType = castType;
mSkillName->setCaption(skill->data->dispName);
mSkillName->adjustSize();
@@ -144,7 +148,7 @@ void SkillPopup::show(const SkillInfo *const skill,
}
}
std::string castStr;
- switch (skill->customCastType)
+ switch (castType)
{
case CastType::Default:
default: