summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-08-01 21:31:15 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-01 21:32:00 +0200
commit290edbefdfc1858d5fba663c9eeb0fada53134f3 (patch)
tree9fc30ee7cd3a580ec2c0aa488ed3b10085e74263
parentb5b28989450f11c4b9feb901cf6b46c211af0e80 (diff)
downloadmana-290edbefdfc1858d5fba663c9eeb0fada53134f3.tar.gz
mana-290edbefdfc1858d5fba663c9eeb0fada53134f3.tar.bz2
mana-290edbefdfc1858d5fba663c9eeb0fada53134f3.tar.xz
mana-290edbefdfc1858d5fba663c9eeb0fada53134f3.zip
Resized minimap + fixed clip
-rw-r--r--src/gui/minimap.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 59e385c4..44df66ae 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -50,7 +50,7 @@ Minimap::Minimap():
{
setWindowName("Minimap");
mShow = config.getValue(getWindowName() + "Show", true);
- setDefaultSize(5, 25, 100, 100);
+ setDefaultSize(5, 25, 150, 150);
// set this to false as the minimap window size is changed
//depending on the map size
setResizable(false);
@@ -116,10 +116,10 @@ void Minimap::setMap(Map *map)
const int offsetX = 2 * getPadding();
const int offsetY = getTitleBarHeight() + getPadding();
const int titleWidth = getFont()->getWidth(getCaption()) + 15;
- const int mapWidth = mMapImage->getWidth() < 100 ?
- mMapImage->getWidth() + offsetX : 100;
- const int mapHeight = mMapImage->getHeight() < 100 ?
- mMapImage->getHeight() + offsetY : 100;
+ const int mapWidth = mMapImage->getWidth() < 150 ?
+ mMapImage->getWidth() + offsetX : 150;
+ const int mapHeight = mMapImage->getHeight() < 150 ?
+ mMapImage->getHeight() + offsetY : 150;
setMinWidth(mapWidth > titleWidth ? mapWidth : titleWidth);
setMinHeight(mapHeight);
@@ -154,8 +154,9 @@ void Minimap::draw(gcn::Graphics *graphics)
{
Window::draw(graphics);
- const gcn::Rectangle a = getChildrenArea();
-
+ gcn::Rectangle a = getChildrenArea();
+ a.width = a.width - 3;
+ a.height = a.height - 3;
graphics->pushClipArea(a);
int mapOriginX = 0;