From 6533db736c7a898211e9955a214a651b43ef712c Mon Sep 17 00:00:00 2001 From: hackykid Date: Tue, 14 Jun 2005 10:59:05 +0000 Subject: (svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138) --- viewport.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'viewport.c') diff --git a/viewport.c b/viewport.c index 1cd6a4f5c..b58d5da98 100644 --- a/viewport.c +++ b/viewport.c @@ -1155,13 +1155,16 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss) w -= 3; } - DrawFrameRect(x,y, x+w, bottom, ss->color, (_display_opt & DO_TRANS_BUILDINGS) ? 0x9 : 0); + /* Draw the rectangle if 'tranparent station signs' is off, or if we are drawing a general text sign (STR_2806) */ + if(!(_display_opt & DO_TRANS_SIGNS) || ss->string == STR_2806) + DrawFrameRect(x,y, x+w, bottom, ss->color, (_display_opt & DO_TRANS_BUILDINGS) ? 0x9 : 0); } SetDParam(0, ss->params[0]); SetDParam(1, ss->params[1]); SetDParam(2, ss->params[2]); - if (_display_opt & DO_TRANS_BUILDINGS && ss->width != 0) { + /* if we didnt draw a rectangle, or if transparant building is on, draw the text in the color the rectangle would have */ + if (((_display_opt & DO_TRANS_BUILDINGS) || (_display_opt & DO_TRANS_SIGNS && ss->string != STR_2806)) && ss->width != 0) { /* Real colors need the IS_PALETTE_COLOR flag, otherwise colors from _string_colormap are assumed. */ DrawString(ss->x >> zoom, (ss->y >> zoom) - (ss->width&0x8000?2:0), ss->string, (_color_list[ss->color].window_color_bgb | IS_PALETTE_COLOR)); -- cgit v1.2.3-54-g00ecf