From 3f8ba76b2fcba7a8b25eebca5ac24a723574dc59 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sun, 17 Jul 2005 17:15:33 +0000 Subject: (svn r2613) - Truncate savegames, and vehicle-texts in their window. - Hardcoded width 5 for saves-path...oops :O --- aircraft_gui.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'aircraft_gui.c') diff --git a/aircraft_gui.c b/aircraft_gui.c index 33bbef5ed..6d41b147c 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -523,10 +523,6 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e) SetDParam(1, v->unitnumber); DrawWindowWidgets(w); - /* draw the flag */ - DrawSprite(v->vehstatus & VS_STOPPED ? 0xC12 : 0xC13, 2, - w->widget[5].top + 1); - if (v->vehstatus & VS_CRASHED) { str = STR_8863_CRASHED; } else if (v->vehstatus & VS_STOPPED) { @@ -559,8 +555,11 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e) } } - DrawStringCentered((w->widget[5].right - w->widget[5].left) / 2, - w->widget[5].top + 1, str, 0); + /* 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); + } DrawWindowViewport(w); } break; -- cgit v1.2.3-54-g00ecf