summaryrefslogtreecommitdiff
path: root/src/gui/minimap.h
diff options
context:
space:
mode:
authorBlue <bluesansdouze@gmail.com>2009-04-26 19:38:59 +0200
committerJared Adams <jaxad0127@gmail.com>2009-04-26 11:51:26 -0600
commitc85b7fd4bf6480495c6f28d10031d3b53988e1d6 (patch)
tree21fd54c5f752426ce61c1da022afa2d0f8d44d04 /src/gui/minimap.h
parent1b114e761b528fdcf132db294dbe83d8aafe3621 (diff)
downloadmana-c85b7fd4bf6480495c6f28d10031d3b53988e1d6.tar.gz
mana-c85b7fd4bf6480495c6f28d10031d3b53988e1d6.tar.bz2
mana-c85b7fd4bf6480495c6f28d10031d3b53988e1d6.tar.xz
mana-c85b7fd4bf6480495c6f28d10031d3b53988e1d6.zip
Minimap ratio adapt
Now the minimap can adapt every image ratio, not only 0.5 (even images with differents width and height)
Diffstat (limited to 'src/gui/minimap.h')
-rw-r--r--src/gui/minimap.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/minimap.h b/src/gui/minimap.h
index c040f7ed..8196683e 100644
--- a/src/gui/minimap.h
+++ b/src/gui/minimap.h
@@ -23,6 +23,7 @@
#define MINIMAP_H
#include "gui/widgets/window.h"
+#include "map.h"
class Image;
@@ -47,13 +48,8 @@ class Minimap : public Window
/**
* Sets the map image that should be displayed.
*/
- void setMapImage(Image *img);
-
- /**
- * Sets the map proportion (1 means 1 tile to one pixel, .5 means 2 tiles to 1 pixel, etc.)
- */
- void setProportion(float proportion) { mProportion = proportion; }
-
+ void setMap(Map *map);
+
/**
* Toggles the displaying of the minimap.
*/
@@ -65,8 +61,10 @@ class Minimap : public Window
void draw(gcn::Graphics *graphics);
private:
+ Map *mMap;
Image *mMapImage;
- float mProportion;
+ float mWidthProportion;
+ float mHeightProportion;
static bool mShow;
};