equal
deleted
inserted
replaced
19 #include "station_map.h" |
19 #include "station_map.h" |
20 //needed for catchments |
20 //needed for catchments |
21 #include "station.h" |
21 #include "station.h" |
22 |
22 |
23 |
23 |
24 static void ShowBusStationPicker(void); |
24 static void ShowBusStationPicker(); |
25 static void ShowTruckStationPicker(void); |
25 static void ShowTruckStationPicker(); |
26 static void ShowRoadDepotPicker(void); |
26 static void ShowRoadDepotPicker(); |
27 |
27 |
28 static bool _remove_button_clicked; |
28 static bool _remove_button_clicked; |
29 |
29 |
30 static byte _place_road_flag; |
30 static byte _place_road_flag; |
31 |
31 |
344 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
344 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
345 _build_road_widgets, |
345 _build_road_widgets, |
346 BuildRoadToolbWndProc |
346 BuildRoadToolbWndProc |
347 }; |
347 }; |
348 |
348 |
349 void ShowBuildRoadToolbar(void) |
349 void ShowBuildRoadToolbar() |
350 { |
350 { |
351 if (!IsValidPlayer(_current_player)) return; |
351 if (!IsValidPlayer(_current_player)) return; |
352 |
352 |
353 DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
353 DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
354 Window *w = AllocateWindowDesc(&_build_road_desc); |
354 Window *w = AllocateWindowDesc(&_build_road_desc); |
378 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
378 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
379 _build_road_scen_widgets, |
379 _build_road_scen_widgets, |
380 BuildRoadToolbWndProc |
380 BuildRoadToolbWndProc |
381 }; |
381 }; |
382 |
382 |
383 void ShowBuildRoadScenToolbar(void) |
383 void ShowBuildRoadScenToolbar() |
384 { |
384 { |
385 AllocateWindowDescFront(&_build_road_scen_desc, 0); |
385 AllocateWindowDescFront(&_build_road_scen_desc, 0); |
386 } |
386 } |
387 |
387 |
388 static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) |
388 static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) |
438 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
438 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
439 _build_road_depot_widgets, |
439 _build_road_depot_widgets, |
440 BuildRoadDepotWndProc |
440 BuildRoadDepotWndProc |
441 }; |
441 }; |
442 |
442 |
443 static void ShowRoadDepotPicker(void) |
443 static void ShowRoadDepotPicker() |
444 { |
444 { |
445 AllocateWindowDesc(&_build_road_depot_desc); |
445 AllocateWindowDesc(&_build_road_depot_desc); |
446 } |
446 } |
447 |
447 |
448 static void RoadStationPickerWndProc(Window *w, WindowEvent *e) |
448 static void RoadStationPickerWndProc(Window *w, WindowEvent *e) |
541 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
541 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
542 _bus_station_picker_widgets, |
542 _bus_station_picker_widgets, |
543 RoadStationPickerWndProc |
543 RoadStationPickerWndProc |
544 }; |
544 }; |
545 |
545 |
546 static void ShowBusStationPicker(void) |
546 static void ShowBusStationPicker() |
547 { |
547 { |
548 AllocateWindowDesc(&_bus_station_picker_desc); |
548 AllocateWindowDesc(&_bus_station_picker_desc); |
549 } |
549 } |
550 |
550 |
551 static const Widget _truck_station_picker_widgets[] = { |
551 static const Widget _truck_station_picker_widgets[] = { |
570 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
570 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
571 _truck_station_picker_widgets, |
571 _truck_station_picker_widgets, |
572 RoadStationPickerWndProc |
572 RoadStationPickerWndProc |
573 }; |
573 }; |
574 |
574 |
575 static void ShowTruckStationPicker(void) |
575 static void ShowTruckStationPicker() |
576 { |
576 { |
577 AllocateWindowDesc(&_truck_station_picker_desc); |
577 AllocateWindowDesc(&_truck_station_picker_desc); |
578 } |
578 } |
579 |
579 |
580 void InitializeRoadGui(void) |
580 void InitializeRoadGui() |
581 { |
581 { |
582 _road_depot_orientation = DIAGDIR_NW; |
582 _road_depot_orientation = DIAGDIR_NW; |
583 _road_station_picker_orientation = DIAGDIR_NW; |
583 _road_station_picker_orientation = DIAGDIR_NW; |
584 } |
584 } |