summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-08-03 18:00:28 +0000
committerpeter1138 <peter1138@openttd.org>2008-08-03 18:00:28 +0000
commit29ba35df7b0fe969824e1596a1a8af3c68ec33c5 (patch)
tree82a5b3195d8ef4a77d62d1289eaeb474e25fafba /src/smallmap_gui.cpp
parent65f26bb7376eda8d6e5c05cd3b26a64a7943c7d3 (diff)
downloadopenttd-29ba35df7b0fe969824e1596a1a8af3c68ec33c5.tar.xz
(svn r13979) -Codechange: Use widget dimensions instead of magic number incantations for limiting small map area.
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index cb42b720b..b87f32947 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -896,7 +896,8 @@ public:
}
}
- if (!FillDrawPixelInfo(&new_dpi, 3, 17, this->width - 28 + 22, this->height - 64 - 11 - diff)) return;
+ const Widget *wi = &this->widget[SM_WIDGET_MAP];
+ if (!FillDrawPixelInfo(&new_dpi, wi->left + 1, wi->top + 1, wi->right - wi->left - 1, wi->bottom - wi->top - 1)) return;
this->DrawSmallMap(&new_dpi);
}