equal
deleted
inserted
replaced
1 #include "stdafx.h" |
1 #include "stdafx.h" |
2 #include "ttd.h" |
2 #include "ttd.h" |
3 #include "table/strings.h" |
3 #include "table/strings.h" |
4 #include "window.h" |
4 #include "window.h" |
|
5 #include "station.h" |
5 #include "gui.h" |
6 #include "gui.h" |
6 #include "viewport.h" |
7 #include "viewport.h" |
7 #include "gfx.h" |
8 #include "gfx.h" |
8 #include "sound.h" |
9 #include "sound.h" |
9 #include "command.h" |
10 #include "command.h" |
201 AllocateWindowDesc(&_build_docks_toolbar_desc); |
202 AllocateWindowDesc(&_build_docks_toolbar_desc); |
202 } |
203 } |
203 |
204 |
204 static void BuildDockStationWndProc(Window *w, WindowEvent *e) |
205 static void BuildDockStationWndProc(Window *w, WindowEvent *e) |
205 { |
206 { |
|
207 int rad; |
|
208 |
206 switch(e->event) { |
209 switch(e->event) { |
207 case WE_PAINT: { |
210 case WE_PAINT: { |
208 if (WP(w,def_d).close) |
211 if (WP(w,def_d).close) |
209 return; |
212 return; |
210 DrawWindowWidgets(w); |
213 DrawWindowWidgets(w); |
211 DrawStationCoverageAreaText(2, 15, (uint)-1); |
214 //Add some code for the coverage area eariler or later!! |
|
215 if (_patches.modified_catchment) { |
|
216 rad = CA_DOCK; |
|
217 } else { |
|
218 rad = 4; |
|
219 } |
|
220 |
|
221 DrawStationCoverageAreaText(2, 15, (uint)-1, rad); |
212 } break; |
222 } break; |
213 |
223 |
214 case WE_CLICK: { |
224 case WE_CLICK: { |
215 if (e->click.widget == 0) { |
225 if (e->click.widget == 0) { |
216 ResetObjectToPlace(); |
226 ResetObjectToPlace(); |