From b8bd8233525d03a575323eaf2933edcc347be860 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 4 Oct 2008 00:48:05 +0000 Subject: 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. --- src/gui/minimap.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui') 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)); } } -- cgit v1.2.3-70-g09d2