changeset 9836:5ac68f4e5353 draft

(svn r13979) -Codechange: Use widget dimensions instead of magic number incantations for limiting small map area.
author peter1138 <peter1138@openttd.org>
date Sun, 03 Aug 2008 18:00:28 +0000
parents c32841e9b508
children 851940f559bc
files src/smallmap_gui.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -896,7 +896,8 @@
 			}
 		}
 
-		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);
 	}