From 276aad47f9669b4cd4acdb462dc1f407774ddc30 Mon Sep 17 00:00:00 2001 From: belugas Date: Fri, 12 Oct 2007 00:43:18 +0000 Subject: [PATCH] (svn r11247) -Fix: The Industry's name to fund could be larger than the window itself. Now, it fits within the physical allowed space --- src/industry_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 682b616414..e38796a5eb 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -173,7 +173,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e) const IndustrySpec *indsp = GetIndustrySpec(_fund_gui.index[i + w->vscroll.pos]); /* Draw the name of the industry in white is selected, otherwise, in orange */ - DrawString(20, y + offset, indsp->name, selected ? 12 : 6); + DrawStringTruncated(20, y + offset, indsp->name, selected ? 12 : 6, max_width - 25); GfxFillRect(x, y + 1 + offset, x + 10, y + 7 + offset, selected ? 15 : 0); GfxFillRect(x + 1, y + 2 + offset, x + 9, y + 6 + offset, indsp->map_colour); }