summaryrefslogtreecommitdiff
path: root/src/gui/widgets/skilllistbox.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-13 19:20:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-13 19:20:00 +0300
commit80b8d209216bbe5aa61f6b9b3ad5142197abf10c (patch)
tree20f3517204843d3d10c7abbeef3c5489f9a31b85 /src/gui/widgets/skilllistbox.h
parente0ffa76b8c20450a32c94ae9c96b58c5f7c0ccfa (diff)
downloadmv-80b8d209216bbe5aa61f6b9b3ad5142197abf10c.tar.gz
mv-80b8d209216bbe5aa61f6b9b3ad5142197abf10c.tar.bz2
mv-80b8d209216bbe5aa61f6b9b3ad5142197abf10c.tar.xz
mv-80b8d209216bbe5aa61f6b9b3ad5142197abf10c.zip
Use global skillPopup variable for show skill popups.
Diffstat (limited to 'src/gui/widgets/skilllistbox.h')
-rw-r--r--src/gui/widgets/skilllistbox.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h
index 62848a98e..b386b4851 100644
--- a/src/gui/widgets/skilllistbox.h
+++ b/src/gui/widgets/skilllistbox.h
@@ -52,7 +52,6 @@ class SkillListBox final : public ListBox
SkillModel *const model) :
ListBox(widget, model, "skilllistbox.xml"),
mModel(model),
- mPopup(CREATEWIDGETR0(SkillPopup)),
mTextColor(getThemeColor(ThemeColorId::TEXT)),
mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE)),
mCooldownColor(getThemeColor(ThemeColorId::SKILL_COOLDOWN)),
@@ -72,7 +71,6 @@ class SkillListBox final : public ListBox
~SkillListBox()
{
delete2(mModel)
- delete2(mPopup)
}
SkillInfo *getSelectedInfo() const
@@ -197,8 +195,8 @@ class SkillListBox final : public ListBox
return;
const SkillInfo *const skill = getSkillByEvent(event);
- mPopup->show(skill);
- mPopup->position(viewport->mMouseX, viewport->mMouseY);
+ skillPopup->show(skill);
+ skillPopup->position(viewport->mMouseX, viewport->mMouseY);
}
void mouseDragged(MouseEvent &event) override final
@@ -245,12 +243,11 @@ class SkillListBox final : public ListBox
void mouseExited(MouseEvent &event A_UNUSED) override final
{
- mPopup->hide();
+ skillPopup->hide();
}
private:
SkillModel *mModel;
- SkillPopup *mPopup;
Color mTextColor;
Color mTextColor2;
Color mCooldownColor;