equal
deleted
inserted
replaced
10 #include "command.h" |
10 #include "command.h" |
11 //needed for catchments |
11 //needed for catchments |
12 #include "station.h" |
12 #include "station.h" |
13 |
13 |
14 |
14 |
15 static void ShowBusStationPicker(); |
15 static void ShowBusStationPicker(void); |
16 static void ShowTruckStationPicker(); |
16 static void ShowTruckStationPicker(void); |
17 static void ShowRoadDepotPicker(); |
17 static void ShowRoadDepotPicker(void); |
18 |
18 |
19 static bool _remove_button_clicked; |
19 static bool _remove_button_clicked; |
20 static bool _build_road_flag; |
20 static bool _build_road_flag; |
21 |
21 |
22 static byte _place_road_flag; |
22 static byte _place_road_flag; |
300 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
300 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
301 _build_road_widgets, |
301 _build_road_widgets, |
302 BuildRoadToolbWndProc |
302 BuildRoadToolbWndProc |
303 }; |
303 }; |
304 |
304 |
305 void ShowBuildRoadToolbar() |
305 void ShowBuildRoadToolbar(void) |
306 { |
306 { |
307 if (_current_player == OWNER_SPECTATOR) return; |
307 if (_current_player == OWNER_SPECTATOR) return; |
308 DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
308 DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
309 AllocateWindowDesc(&_build_road_desc); |
309 AllocateWindowDesc(&_build_road_desc); |
310 } |
310 } |
333 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
333 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
334 _build_road_scen_widgets, |
334 _build_road_scen_widgets, |
335 BuildRoadToolbWndProc |
335 BuildRoadToolbWndProc |
336 }; |
336 }; |
337 |
337 |
338 void ShowBuildRoadScenToolbar() |
338 void ShowBuildRoadScenToolbar(void) |
339 { |
339 { |
340 AllocateWindowDescFront(&_build_road_scen_desc, 0); |
340 AllocateWindowDescFront(&_build_road_scen_desc, 0); |
341 } |
341 } |
342 |
342 |
343 static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) { |
343 static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) { |
396 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
396 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
397 _build_road_depot_widgets, |
397 _build_road_depot_widgets, |
398 BuildRoadDepotWndProc |
398 BuildRoadDepotWndProc |
399 }; |
399 }; |
400 |
400 |
401 static void ShowRoadDepotPicker() |
401 static void ShowRoadDepotPicker(void) |
402 { |
402 { |
403 AllocateWindowDesc(&_build_road_depot_desc); |
403 AllocateWindowDesc(&_build_road_depot_desc); |
404 } |
404 } |
405 |
405 |
406 static void RoadStationPickerWndProc(Window *w, WindowEvent *e) |
406 static void RoadStationPickerWndProc(Window *w, WindowEvent *e) |
491 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
491 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
492 _bus_station_picker_widgets, |
492 _bus_station_picker_widgets, |
493 RoadStationPickerWndProc |
493 RoadStationPickerWndProc |
494 }; |
494 }; |
495 |
495 |
496 static void ShowBusStationPicker() |
496 static void ShowBusStationPicker(void) |
497 { |
497 { |
498 AllocateWindowDesc(&_bus_station_picker_desc); |
498 AllocateWindowDesc(&_bus_station_picker_desc); |
499 } |
499 } |
500 |
500 |
501 static const Widget _truck_station_picker_widgets[] = { |
501 static const Widget _truck_station_picker_widgets[] = { |
517 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
517 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
518 _truck_station_picker_widgets, |
518 _truck_station_picker_widgets, |
519 RoadStationPickerWndProc |
519 RoadStationPickerWndProc |
520 }; |
520 }; |
521 |
521 |
522 static void ShowTruckStationPicker() |
522 static void ShowTruckStationPicker(void) |
523 { |
523 { |
524 AllocateWindowDesc(&_truck_station_picker_desc); |
524 AllocateWindowDesc(&_truck_station_picker_desc); |
525 } |
525 } |
526 |
526 |
527 void InitializeRoadGui() |
527 void InitializeRoadGui(void) |
528 { |
528 { |
529 _road_depot_orientation = 3; |
529 _road_depot_orientation = 3; |
530 _road_station_picker_orientation = 3; |
530 _road_station_picker_orientation = 3; |
531 } |
531 } |