equal
deleted
inserted
replaced
8 #include "viewport.h" |
8 #include "viewport.h" |
9 #include "gfx.h" |
9 #include "gfx.h" |
10 #include "sound.h" |
10 #include "sound.h" |
11 #include "command.h" |
11 #include "command.h" |
12 |
12 |
13 static void ShowBuildDockStationPicker(); |
13 static void ShowBuildDockStationPicker(void); |
14 static void ShowBuildDocksDepotPicker(); |
14 static void ShowBuildDocksDepotPicker(void); |
15 |
15 |
16 static byte _ship_depot_direction; |
16 static byte _ship_depot_direction; |
17 |
17 |
18 void CcBuildDocks(bool success, uint tile, uint32 p1, uint32 p2) |
18 void CcBuildDocks(bool success, uint tile, uint32 p1, uint32 p2) |
19 { |
19 { |
200 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
200 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
201 _build_docks_toolb_widgets, |
201 _build_docks_toolb_widgets, |
202 BuildDocksToolbWndProc |
202 BuildDocksToolbWndProc |
203 }; |
203 }; |
204 |
204 |
205 void ShowBuildDocksToolbar() |
205 void ShowBuildDocksToolbar(void) |
206 { |
206 { |
207 if (_current_player == OWNER_SPECTATOR) return; |
207 if (_current_player == OWNER_SPECTATOR) return; |
208 DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
208 DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
209 AllocateWindowDesc(&_build_docks_toolbar_desc); |
209 AllocateWindowDesc(&_build_docks_toolbar_desc); |
210 } |
210 } |
276 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
276 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
277 _build_dock_station_widgets, |
277 _build_dock_station_widgets, |
278 BuildDockStationWndProc |
278 BuildDockStationWndProc |
279 }; |
279 }; |
280 |
280 |
281 static void ShowBuildDockStationPicker() |
281 static void ShowBuildDockStationPicker(void) |
282 { |
282 { |
283 AllocateWindowDesc(&_build_dock_station_desc); |
283 AllocateWindowDesc(&_build_dock_station_desc); |
284 } |
284 } |
285 |
285 |
286 static void UpdateDocksDirection() |
286 static void UpdateDocksDirection(void) |
287 { |
287 { |
288 if (_ship_depot_direction != 0) { |
288 if (_ship_depot_direction != 0) { |
289 SetTileSelectSize(1, 2); |
289 SetTileSelectSize(1, 2); |
290 } else { |
290 } else { |
291 SetTileSelectSize(2, 1); |
291 SetTileSelectSize(2, 1); |
347 _build_docks_depot_widgets, |
347 _build_docks_depot_widgets, |
348 BuildDocksDepotWndProc |
348 BuildDocksDepotWndProc |
349 }; |
349 }; |
350 |
350 |
351 |
351 |
352 static void ShowBuildDocksDepotPicker() |
352 static void ShowBuildDocksDepotPicker(void) |
353 { |
353 { |
354 AllocateWindowDesc(&_build_docks_depot_desc); |
354 AllocateWindowDesc(&_build_docks_depot_desc); |
355 UpdateDocksDirection(); |
355 UpdateDocksDirection(); |
356 } |
356 } |
357 |
357 |
358 |
358 |
359 void InitializeDockGui() |
359 void InitializeDockGui(void) |
360 { |
360 { |
361 _ship_depot_direction = 0; |
361 _ship_depot_direction = 0; |
362 } |
362 } |