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 | 5b0743d66bf73a1bbfdd95beca039283091d8d46 (patch) | |
tree | aa862fd953b81bbc7c142d763f82868807933f7e /rail_gui.c | |
parent | 6fd3fc10e347695b28c8b3d1e0074b5456cd8100 (diff) | |
download | openttd-5b0743d66bf73a1bbfdd95beca039283091d8d46.tar.xz |
(svn r979) Allow more realistically sized catchment areas
Diffstat (limited to 'rail_gui.c')
-rw-r--r-- | rail_gui.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/rail_gui.c b/rail_gui.c index 7fdde306a..28f12caac 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -849,6 +849,7 @@ static void HandleStationPlacement(uint start, uint end) } static void StationBuildWndProc(Window *w, WindowEvent *e) { + int rad; switch(e->event) { case WE_PAINT: { uint bits; @@ -876,8 +877,15 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) { SetTileSelectSize(x, y); } + if (_patches.modified_catchment) { + rad = CA_TRAIN; + } else { + rad = 4; + } + + if (_station_show_coverage) - SetTileSelectBigSize(-4, -4, 8, 8); + SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); DrawWindowWidgets(w); @@ -889,7 +897,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) { DrawStringCentered(74, 101, STR_3004_PLATFORM_LENGTH, 0); DrawStringCentered(74, 141, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); - DrawStationCoverageAreaText(2, 166, (uint)-1); + DrawStationCoverageAreaText(2, 166, (uint)-1, rad); } break; case WE_CLICK: { |