summaryrefslogtreecommitdiff
path: root/ship_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-07-17 19:23:18 +0000
committerDarkvater <darkvater@openttd.org>2005-07-17 19:23:18 +0000
commit0550c4a87a4d9dc1fb3536234ad1f23621123e95 (patch)
tree9376c9d570e22b44516c49ab07ce3e375c97c948 /ship_gui.c
parent52b42ff5081f25da96f70d7f16705e71e691216e (diff)
downloadopenttd-0550c4a87a4d9dc1fb3536234ad1f23621123e95.tar.xz
(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.
Diffstat (limited to 'ship_gui.c')
-rw-r--r--ship_gui.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ship_gui.c b/ship_gui.c
index a71341f38..14d0e0179 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -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;