summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-22 14:15:50 +0000
committerrubidium <rubidium@openttd.org>2009-11-22 14:15:50 +0000
commita9e09df92375d66bb59750e35e1dc665ba6a1f31 (patch)
tree88e6f97079eef9b14cb0d6a3c6ef5e3d125d396a /src/newgrf_gui.cpp
parentbf93372ca26375e392ff62a91db4de4c126dff38 (diff)
downloadopenttd-a9e09df92375d66bb59750e35e1dc665ba6a1f31.tar.xz
(svn r18221) -Codechange: make the NewGRF window big font aware
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 779f78621..539ffec30 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -638,6 +638,7 @@ struct NewGRFWindow : public Window {
switch (widget) {
case SNGRFS_FILE_LIST: {
uint y = r.top + WD_MATRIX_TOP;
+ int sprite_offset_y = (FONT_HEIGHT_NORMAL - 10) / 2 - 1;
bool rtl = _dynlang.text_dir == TD_RTL;
uint text_left = rtl ? r.left + WD_FRAMERECT_LEFT : r.left + 25;
@@ -674,8 +675,8 @@ struct NewGRFWindow : public Window {
}
}
- DrawSprite(SPR_SQUARE, pal, square_left, y - 1);
- if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, warning_left, y - 1);
+ DrawSprite(SPR_SQUARE, pal, square_left, y + sprite_offset_y);
+ if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, warning_left, y + sprite_offset_y);
uint txtoffset = c->error == NULL ? 0 : 10;
DrawString(text_left + (rtl ? 0 : txtoffset), text_right - (rtl ? txtoffset : 0), y, text, this->sel == c ? TC_WHITE : TC_BLACK);
y += this->resize.step_height;