summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-05-17 21:14:50 +0000
committeralberth <alberth@openttd.org>2010-05-17 21:14:50 +0000
commitbee74bd82b9328aa7b24e97dcb87941f101435ef (patch)
tree550b318ea6bd06492587fa9c30aa210e4982fb06 /src/newgrf_gui.cpp
parent255a3331bf6f58ea2ef2cb4d97b49f2a386d3f1b (diff)
downloadopenttd-bee74bd82b9328aa7b24e97dcb87941f101435ef.tar.xz
(svn r19849) -Fix: Center sprite and text seperately in the newgrf gui active list.
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 bd16e378d..9c9133a34 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -343,7 +343,8 @@ struct NewGRFWindow : public QueryStringBaseWindow {
uint step_height = this->GetWidget<NWidgetBase>(SNGRFS_FILE_LIST)->resize_y;
uint y = r.top + WD_FRAMERECT_TOP;
- int sprite_offset_y = (step_height - FONT_HEIGHT_NORMAL) / 2;
+ int sprite_offset_y = (step_height - 10) / 2;
+ int offset_y = (step_height - FONT_HEIGHT_NORMAL) / 2;
bool rtl = _dynlang.text_dir == TD_RTL;
uint text_left = rtl ? r.left + WD_FRAMERECT_LEFT : r.left + 25;
@@ -362,7 +363,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
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 + sprite_offset_y, text, h ? TC_WHITE : TC_ORANGE);
+ DrawString(text_left + (rtl ? 0 : txtoffset), text_right - (rtl ? txtoffset : 0), y + offset_y, text, h ? TC_WHITE : TC_ORANGE);
y += step_height;
}
}