summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-11-03 23:29:24 +0000
committerpeter1138 <peter1138@openttd.org>2006-11-03 23:29:24 +0000
commit5f4118c6382c6c4e16a5d5013f7804640cd10948 (patch)
tree806b29ac8caf76142b19f1a3ab6872d58dfd450f
parent8cfe4d6a67ddbde35169adbe2ea0b1c87730ac82 (diff)
downloadopenttd-5f4118c6382c6c4e16a5d5013f7804640cd10948.tar.xz
(svn r7058) -Codechange: Truncate text in window captions
-rw-r--r--widget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/widget.c b/widget.c
index eee94b4bd..783510557 100644
--- a/widget.c
+++ b/widget.c
@@ -455,7 +455,7 @@ void DrawWindowWidgets(const Window *w)
GfxFillRect(r.left+2, r.top+2, r.right-2, r.bottom-2, _colour_gradient[_player_colors[w->caption_color]][4]);
}
- DrawStringCentered( (r.left+r.right+1)>>1, r.top+2, wi->data, 0x84);
+ DrawStringCenteredTruncated(r.left + 2, r.right - 2, r.top+2, wi->data, 0x84);
draw_default:;
if (IsWidgetDisabled(wi)) {
GfxFillRect(r.left+1, r.top+1, r.right-1, r.bottom-1, _colour_gradient[wi->color&0xF][2] | PALETTE_MODIFIER_GREYOUT);