(svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long.

This commit is contained in:
2008-01-27 11:01:10 +00:00
parent 7b29dcde3c
commit 0847def759
6 changed files with 33 additions and 10 deletions

View File

@@ -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;