From 0550c4a87a4d9dc1fb3536234ad1f23621123e95 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sun, 17 Jul 2005 19:23:18 +0000 Subject: (svn r2623) - CodeChange: rework DrawStringCenteredTruncated() a bit. Instead of giving center + width you give the coordinates of the bounding box (left, right) it has to fit in (ludde) - CodeChange: changed (back) maximum pixel length of truncated strings to a signed integer. --- roadveh_gui.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'roadveh_gui.c') diff --git a/roadveh_gui.c b/roadveh_gui.c index eba65049b..88dbec7e1 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -277,10 +277,8 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e) } /* draw the flag plus orders */ - { int w_width = w->widget[5].right - w->widget[5].left; - DrawSprite(v->vehstatus & VS_STOPPED ? 0xC12 : 0xC13, 2, w->widget[5].top + 1); - DrawStringCenteredTruncated(w_width / 2 + 6, w->widget[5].top + 1, str, 0, w_width - 8); - } + DrawSprite(v->vehstatus & VS_STOPPED ? 0xC12 : 0xC13, 2, w->widget[5].top + 1); + DrawStringCenteredTruncated(w->widget[5].left + 8, w->widget[5].right, w->widget[5].top + 1, str, 0); DrawWindowViewport(w); } break; -- cgit v1.2.3-54-g00ecf