diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-27 11:01:10 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-27 11:01:10 +0000 |
commit | 0847def759cd8c07d880387779d2d54cdc5382f8 (patch) | |
tree | 0e1beb3106f8e27722ec2f9a2861a662e09a4207 /src/rail_gui.cpp | |
parent | 7b29dcde3cef3d91dd23b3378736f378c028a16e (diff) | |
download | openttd-0847def759cd8c07d880387779d2d54cdc5382f8.tar.xz |
(svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index b29267af3..698ceaa0c 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -864,7 +864,12 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) DrawStringCentered(74, 101 + y_offset, STR_3004_PLATFORM_LENGTH, TC_FROMSTRING); DrawStringCentered(74, 141 + y_offset, STR_3066_COVERAGE_AREA_HIGHLIGHT, TC_FROMSTRING); - DrawStationCoverageAreaText(2, 166 + y_offset, SCT_ALL, rad); + int text_end = DrawStationCoverageAreaText(2, 166 + y_offset, SCT_ALL, rad) + 4; + if (text_end > w->widget[BRSW_BACKGROUND].bottom) { + SetWindowDirty(w); + ResizeWindowForWidget(w, BRSW_BACKGROUND, 0, text_end - w->widget[BRSW_BACKGROUND].bottom); + SetWindowDirty(w); + } if (newstations) { uint y = 35; |