diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-04 00:48:05 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-04 00:48:05 +0000 |
commit | b8bd8233525d03a575323eaf2933edcc347be860 (patch) | |
tree | 0b4d094167abb7a197347b52a8543c09f29aeb38 | |
parent | 0edd8dd17c324ac0c0eec1109e0819e42b916731 (diff) | |
download | mana-b8bd8233525d03a575323eaf2933edcc347be860.tar.gz mana-b8bd8233525d03a575323eaf2933edcc347be860.tar.bz2 mana-b8bd8233525d03a575323eaf2933edcc347be860.tar.xz mana-b8bd8233525d03a575323eaf2933edcc347be860.zip |
Changed minimap code to take minimaps twice the TMW size, added map
names on all of the maps, and redid minimaps to fit the new minimap
code.
-rw-r--r-- | src/gui/minimap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index dc7df9b9..9f4df73c 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -35,8 +35,6 @@ Minimap::Minimap(): mMapImage(NULL) { setWindowName("MiniMap"); - setDefaultSize(5, 25, 100, 100); - loadWindowState(); } Minimap::~Minimap() @@ -59,6 +57,8 @@ void Minimap::setMapImage(Image *img) if (mMapImage) { mMapImage->setAlpha(0.7); + setDefaultSize(5, 25, img->getWidth(), img->getHeight()); + loadWindowState(); } } @@ -103,11 +103,11 @@ void Minimap::draw(gcn::Graphics *graphics) continue; } - int offset = (dotSize - 1) / 2; + int offset = (dotSize - 1); graphics->fillRectangle(gcn::Rectangle( - being->mX / 2 + getPadding() - offset, - being->mY / 2 + getTitleBarHeight() - offset, + being->mX + getPadding() - offset, + being->mY + getTitleBarHeight() - offset, dotSize, dotSize)); } } |