mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-18 03:59:09 +00:00
(svn r7058) -Codechange: Truncate text in window captions
This commit is contained in:
2
widget.c
2
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]);
|
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:;
|
draw_default:;
|
||||||
if (IsWidgetDisabled(wi)) {
|
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);
|
GfxFillRect(r.left+1, r.top+1, r.right-1, r.bottom-1, _colour_gradient[wi->color&0xF][2] | PALETTE_MODIFIER_GREYOUT);
|
||||||
|
Reference in New Issue
Block a user