(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.
This commit is contained in:
Darkvater
2005-07-17 19:23:18 +00:00
parent b998b9b8e6
commit 186036229c
6 changed files with 25 additions and 34 deletions

View File

@@ -516,10 +516,8 @@ static void ShipViewWndProc(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;