(svn r2613) - Truncate savegames, and vehicle-texts in their window.

- Hardcoded width 5 for saves-path...oops :O
This commit is contained in:
Darkvater
2005-07-17 17:15:33 +00:00
parent 99c6944497
commit f8b7b107d8
5 changed files with 22 additions and 26 deletions

View File

@@ -834,10 +834,6 @@ static void TrainViewWndProc(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.rail.crash_anim_pos != 0) {
str = STR_8863_CRASHED;
} else if (v->breakdown_ctr == 1) {
@@ -886,8 +882,11 @@ static void TrainViewWndProc(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;