summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-07 13:49:18 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-07 13:49:18 +0000
commit112fbe319f1e9070e9b6b62a7ec12d625a19be51 (patch)
tree62572ba750a8fb8d37d2f63a69f282d8590f4c31 /src/gui/minimap.cpp
parent682be63061b2134cd3bc8b272fd3180e82437bb9 (diff)
downloadmana-112fbe319f1e9070e9b6b62a7ec12d625a19be51.tar.gz
mana-112fbe319f1e9070e9b6b62a7ec12d625a19be51.tar.bz2
mana-112fbe319f1e9070e9b6b62a7ec12d625a19be51.tar.xz
mana-112fbe319f1e9070e9b6b62a7ec12d625a19be51.zip
* Fixed crash on exit when trying to delete listbox that wasn't created.
* Disabled Ok button in Buy and Sell dialog when amount is 0 * Corrected the three known map bugs
Diffstat (limited to 'src/gui/minimap.cpp')
-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 c43f5218..899ec78c 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -39,7 +39,8 @@ Minimap::Minimap()
sourceRect.x = sourceRect.y = 0;
sourceRect.w = MINIMAP_W;
sourceRect.h = MINIMAP_H;
- if ( mapBackground )
+
+ if (mapBackground)
{
SDL_FillRect(mapBackground, &sourceRect, mapColor);
SDL_SetAlpha(mapBackground, SDL_SRCALPHA, 120);
@@ -59,18 +60,18 @@ void Minimap::draw(gcn::Graphics *graphics)
getWidth(), getHeight(),
(screen->format->BytesPerPixel * 8), 0, 0, 0, 0);
Uint32 mapColor = SDL_MapRGB(screen->format, 52, 149, 210);
- SDL_Rect sourceRect;
- sourceRect.x = sourceRect.y = 0;
- sourceRect.w = getWidth();
- sourceRect.h = getHeight();
if (mapBackground)
{
+ SDL_Rect sourceRect;
+ sourceRect.x = sourceRect.y = 0;
+ sourceRect.w = getWidth();
+ sourceRect.h = getHeight();
SDL_FillRect(mapBackground, &sourceRect, mapColor);
SDL_SetAlpha(mapBackground, SDL_SRCALPHA, 120);
}
}
-
+
if (mapBackground)
{
SDL_Rect screenRect;
@@ -81,7 +82,7 @@ void Minimap::draw(gcn::Graphics *graphics)
SDL_BlitSurface(mapBackground, NULL, screen, &screenRect);
}
-
+
graphics->setColor(gcn::Color(0, 0, 0));
graphics->drawRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight()));
graphics->setColor(gcn::Color(209, 52, 61));