diff options
author | Blue <bluesansdouze@gmail.com> | 2009-04-26 19:38:59 +0200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-26 11:51:26 -0600 |
commit | c85b7fd4bf6480495c6f28d10031d3b53988e1d6 (patch) | |
tree | 21fd54c5f752426ce61c1da022afa2d0f8d44d04 /src/gui/minimap.h | |
parent | 1b114e761b528fdcf132db294dbe83d8aafe3621 (diff) | |
download | mana-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.h | 14 |
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; }; |