mirror of https://github.com/OpenTTD/OpenTTD
(svn r11247) -Fix: The Industry's name to fund could be larger than the window itself. Now, it fits within the physical allowed space
parent
0bedd88870
commit
9934cb8a1c
|
@ -173,7 +173,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
|
||||||
const IndustrySpec *indsp = GetIndustrySpec(_fund_gui.index[i + w->vscroll.pos]);
|
const IndustrySpec *indsp = GetIndustrySpec(_fund_gui.index[i + w->vscroll.pos]);
|
||||||
|
|
||||||
/* Draw the name of the industry in white is selected, otherwise, in orange */
|
/* 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, 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);
|
GfxFillRect(x + 1, y + 2 + offset, x + 9, y + 6 + offset, indsp->map_colour);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue