diff options
author | Darkvater <darkvater@openttd.org> | 2005-07-17 17:15:33 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-07-17 17:15:33 +0000 |
commit | f8b7b107d868d2e05a8c36df191917d7e9b1ca80 (patch) | |
tree | b618eaf70bf02a242a3d2bb8f7a4a7add02e2f29 /roadveh_gui.c | |
parent | 99c6944497747b461c05f9c8026c7d34a7a17de5 (diff) | |
download | openttd-f8b7b107d868d2e05a8c36df191917d7e9b1ca80.tar.xz |
(svn r2613) - Truncate savegames, and vehicle-texts in their window.
- Hardcoded width 5 for saves-path...oops :O
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r-- | roadveh_gui.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c index 972770885..eba65049b 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -240,10 +240,6 @@ static void RoadVehViewWndProc(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->u.road.crashed_ctr != 0) { str = STR_8863_CRASHED; } else if (v->breakdown_ctr == 1) { @@ -280,8 +276,11 @@ static void RoadVehViewWndProc(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; |