diff options
author | Celestar <Celestar@openttd.org> | 2004-12-08 15:46:13 +0000 |
---|---|---|
committer | Celestar <Celestar@openttd.org> | 2004-12-08 15:46:13 +0000 |
commit | 945ceb06fc166379a9d0ffa4dfafe68894cba9e6 (patch) | |
tree | aa862fd953b81bbc7c142d763f82868807933f7e /airport_gui.c | |
parent | 932610e61256af745c96f7fa1808a459d3e627fb (diff) | |
download | openttd-945ceb06fc166379a9d0ffa4dfafe68894cba9e6.tar.xz |
(svn r979) Allow more realistically sized catchment areas
Diffstat (limited to 'airport_gui.c')
-rw-r--r-- | airport_gui.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/airport_gui.c b/airport_gui.c index 6c14f29e9..20e68b2ed 100644 --- a/airport_gui.c +++ b/airport_gui.c @@ -134,6 +134,8 @@ void ShowBuildAirToolbar() static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) { + int rad; + switch(e->event) { case WE_PAINT: { int sel; @@ -155,13 +157,28 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) // select default the coverage area to 'Off' (8) w->click_state = ((1<<3) << sel) | ((1<<8) << _station_show_coverage); SetTileSelectSize(_airport_size_x[sel],_airport_size_y[sel]); - if (_station_show_coverage) SetTileSelectBigSize(-4, -4, 8, 8); + + if (_patches.modified_catchment) { + switch (sel) { + case AT_OILRIG: rad = CA_AIR_OILPAD; break; + case AT_HELIPORT: rad = CA_AIR_HELIPORT; break; + case AT_SMALL: rad = CA_AIR_SMALL; break; + case AT_LARGE: rad = CA_AIR_LARGE; break; + case AT_METROPOLITAN: rad = CA_AIR_METRO; break; + case AT_INTERNATIONAL: rad = CA_AIR_INTER; break; + } + } else { + rad = 4; + } + + + if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); DrawWindowWidgets(w); // strings such as 'Size' and 'Coverage Area' DrawStringCentered(74, 16, STR_305B_SIZE, 0); DrawStringCentered(74, 78, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); - DrawStationCoverageAreaText(2, 104, (uint)-1); + DrawStationCoverageAreaText(2, 104, (uint)-1, rad); break; } |