summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-10-12 00:43:18 +0000
committerbelugas <belugas@openttd.org>2007-10-12 00:43:18 +0000
commit9934cb8a1c24b6e041b7c6f9192c5d2d1d0b8bd2 (patch)
tree221c8e7c27c642951223eadeffbb7b934a943eca /src
parent0bedd88870c67a747c720ecd9fc65bed700d8a45 (diff)
downloadopenttd-9934cb8a1c24b6e041b7c6f9192c5d2d1d0b8bd2.tar.xz
(svn r11247) -Fix: The Industry's name to fund could be larger than the window itself. Now, it fits within the physical allowed space
Diffstat (limited to 'src')
-rw-r--r--src/industry_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 682b61641..e38796a5e 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);
}