diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-17 14:41:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-17 14:41:19 +0300 |
commit | 5fc6dccf5c22f7245d03094fab908e1afb2b22b8 (patch) | |
tree | 02a4d902e9bad0939168befe45e5162332229dbb /src/gui/windows | |
parent | 1338c1f3e191095a220f0b14a884a385fa8bc915 (diff) | |
download | manaverse-5fc6dccf5c22f7245d03094fab908e1afb2b22b8.tar.gz manaverse-5fc6dccf5c22f7245d03094fab908e1afb2b22b8.tar.bz2 manaverse-5fc6dccf5c22f7245d03094fab908e1afb2b22b8.tar.xz manaverse-5fc6dccf5c22f7245d03094fab908e1afb2b22b8.zip |
Use public text popup in minimap.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/minimap.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/minimap.h | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index 16e18fe35..50e78666f 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -60,14 +60,11 @@ Minimap::Minimap() : mWidthProportion(0.5), mHeightProportion(0.5), mMapImage(nullptr), - mTextPopup(new TextPopup), mMapOriginX(0), mMapOriginY(0), mCustomMapImage(false), mAutoResize(config.getBoolValue("autoresizeminimaps")) { - mTextPopup->postInit(); - setWindowName("Minimap"); mShow = config.getValueBool(getWindowName() + "Show", true); @@ -97,7 +94,6 @@ Minimap::~Minimap() config.removeListeners(this); CHECKLISTENERS deleteMapImage(); - delete2(mTextPopup); } void Minimap::deleteMapImage() @@ -472,13 +468,13 @@ void Minimap::mouseMoved(MouseEvent &event) const int x = event.getX(); const int y = event.getY(); const Rect &rect = mDimension; - mTextPopup->show(x + rect.x, y + rect.y, mCaption); + textPopup->show(x + rect.x, y + rect.y, mCaption); } void Minimap::mouseExited(MouseEvent &event) { Window::mouseExited(event); - mTextPopup->hide(); + textPopup->hide(); } void Minimap::screenToMap(int &x, int &y) diff --git a/src/gui/windows/minimap.h b/src/gui/windows/minimap.h index 18a8a0a8b..eacf7a018 100644 --- a/src/gui/windows/minimap.h +++ b/src/gui/windows/minimap.h @@ -78,7 +78,6 @@ class Minimap final : public Window, public ConfigListener float mWidthProportion; float mHeightProportion; Image *mMapImage; - TextPopup *mTextPopup; int mMapOriginX; int mMapOriginY; bool mCustomMapImage; |