diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-17 15:17:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-17 15:17:20 +0300 |
commit | e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158 (patch) | |
tree | 55d6d087af2afc6d9f14859e4c98a5ecf49dd020 /src/gui | |
parent | 974eff0d1607d9f2648ecd9fbb3abfd53aa6bec4 (diff) | |
download | manaplus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.tar.gz manaplus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.tar.bz2 manaplus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.tar.xz manaplus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.zip |
Use public item popup in dropshortcutcontainer.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.cpp | 18 | ||||
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.h | 1 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index 8fe3a8b2b..9d423f8ac 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -48,14 +48,11 @@ DropShortcutContainer::DropShortcutContainer(Widget2 *const widget) : ShortcutContainer(widget), mItemClicked(false), - mItemPopup(new ItemPopup), mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)), mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)), mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)), mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)) { - mItemPopup->postInit(); - if (dropShortcut) mMaxItems = dropShortcut->getItemCount(); else @@ -64,7 +61,6 @@ DropShortcutContainer::DropShortcutContainer(Widget2 *const widget) : DropShortcutContainer::~DropShortcutContainer() { - delete2(mItemPopup); } void DropShortcutContainer::setWidget2(const Widget2 *const widget) @@ -281,23 +277,23 @@ void DropShortcutContainer::mouseMoved(MouseEvent &event) if (item && viewport) { - mItemPopup->setItem(item); - mItemPopup->position(viewport->getMouseX(), viewport->getMouseY()); + itemPopup->setItem(item); + itemPopup->position(viewport->getMouseX(), viewport->getMouseY()); } else { - mItemPopup->setVisible(false); + itemPopup->setVisible(false); } } void DropShortcutContainer::mouseExited(MouseEvent &event A_UNUSED) { - if (mItemPopup) - mItemPopup->setVisible(false); + if (itemPopup) + itemPopup->setVisible(false); } void DropShortcutContainer::widgetHidden(const Event &event A_UNUSED) { - if (mItemPopup) - mItemPopup->setVisible(false); + if (itemPopup) + itemPopup->setVisible(false); } diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h index 1888292de..84d85c6c0 100644 --- a/src/gui/widgets/dropshortcutcontainer.h +++ b/src/gui/widgets/dropshortcutcontainer.h @@ -78,7 +78,6 @@ class DropShortcutContainer final : public ShortcutContainer private: bool mItemClicked; - ItemPopup *mItemPopup; Color mEquipedColor; Color mEquipedColor2; Color mUnEquipedColor; |