13 | @@ -403,11 +404,14 @@
| 13 | @@ -106,6 +107,7 @@
|
---|
14 | {
| 14 | ~BuildDocksToolbarWindow()
|
---|
15 | this->InitNested(TRANSPORT_WATER);
| 15 | {
|
---|
16 | this->LowerWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
| 16 | if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
|
---|
17 | + StartTempTransparency();
| 17 | + StopTempTransparency();
|
---|
18 | }
| 18 | }
|
---|
| | 19 |
|
---|
| | 20 | /**
|
---|
| | 21 | @@ -126,6 +128,7 @@
|
---|
| | 22 | if (!can_build) {
|
---|
| | 23 | DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
---|
| | 24 | DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
---|
| | 25 | + StopTempTransparency();
|
---|
| | 26 | }
|
---|
| | 27 | }
|
---|
| | 28 |
|
---|
| | 29 | @@ -133,39 +136,45 @@
|
---|
| | 30 | {
|
---|
| | 31 | switch (widget) {
|
---|
| | 32 | case WID_DT_CANAL: // Build canal button
|
---|
| | 33 | - HandlePlacePushButton(this, WID_DT_CANAL, SPR_CURSOR_CANAL, HT_RECT);
|
---|
| | 34 | + if (HandlePlacePushButton(this, WID_DT_CANAL, SPR_CURSOR_CANAL, HT_RECT)) StartTempTransparency();
|
---|
| | 35 | break;
|
---|
| | 36 |
|
---|
| | 37 | case WID_DT_LOCK: // Build lock button
|
---|
| | 38 | - HandlePlacePushButton(this, WID_DT_LOCK, SPR_CURSOR_LOCK, HT_SPECIAL);
|
---|
| | 39 | + if (HandlePlacePushButton(this, WID_DT_LOCK, SPR_CURSOR_LOCK, HT_SPECIAL)) StartTempTransparency();
|
---|
| | 40 | break;
|
---|
| | 41 |
|
---|
| | 42 | case WID_DT_DEMOLISH: // Demolish aka dynamite button
|
---|
| | 43 | - HandlePlacePushButton(this, WID_DT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
|
---|
| | 44 | + if (HandlePlacePushButton(this, WID_DT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL)) StartTempTransparency();
|
---|
| | 45 | break;
|
---|
| | 46 |
|
---|
| | 47 | case WID_DT_DEPOT: // Build depot button
|
---|
| | 48 | if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
---|
| | 49 | - if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) ShowBuildDocksDepotPicker(this);
|
---|
| | 50 | + if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) {
|
---|
| | 51 | + ShowBuildDocksDepotPicker(this);
|
---|
| | 52 | + StartTempTransparency();
|
---|
| | 53 | + }
|
---|
| | 54 | break;
|
---|
| | 55 |
|
---|
| | 56 | case WID_DT_STATION: // Build station button
|
---|
| | 57 | if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
---|
| | 58 | - if (HandlePlacePushButton(this, WID_DT_STATION, SPR_CURSOR_DOCK, HT_SPECIAL)) ShowBuildDockStationPicker(this);
|
---|
| | 59 | + if (HandlePlacePushButton(this, WID_DT_STATION, SPR_CURSOR_DOCK, HT_SPECIAL)) {
|
---|
| | 60 | + ShowBuildDockStationPicker(this);
|
---|
| | 61 | + StartTempTransparency();
|
---|
| | 62 | + }
|
---|
| | 63 | break;
|
---|
| | 64 |
|
---|
| | 65 | case WID_DT_BUOY: // Build buoy button
|
---|
| | 66 | if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
---|
| | 67 | - HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT);
|
---|
| | 68 | + if (HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT)) StartTempTransparency();
|
---|
| | 69 | break;
|
---|
| | 70 |
|
---|
| | 71 | case WID_DT_RIVER: // Build river button (in scenario editor)
|
---|
| | 72 | if (_game_mode != GM_EDITOR) return;
|
---|
| | 73 | - HandlePlacePushButton(this, WID_DT_RIVER, SPR_CURSOR_RIVER, HT_RECT);
|
---|
| | 74 | + if (HandlePlacePushButton(this, WID_DT_RIVER, SPR_CURSOR_RIVER, HT_RECT)) StartTempTransparency();
|
---|
| | 75 | break;
|
---|
| | 76 |
|
---|
| | 77 | case WID_DT_BUILD_AQUEDUCT: // Build aqueduct button
|
---|
| | 78 | - HandlePlacePushButton(this, WID_DT_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_SPECIAL);
|
---|
| | 79 | + if (HandlePlacePushButton(this, WID_DT_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_SPECIAL)) StartTempTransparency();
|
---|
| | 80 | break;
|
---|
| | 81 |
|
---|
| | 82 | default: return;
|
---|
| | 83 | @@ -254,6 +263,7 @@
|
---|
| | 84 | DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
---|
| | 85 | DeleteWindowById(WC_SELECT_STATION, 0);
|
---|
| | 86 | DeleteWindowByClass(WC_BUILD_BRIDGE);
|
---|
| | 87 | + StopTempTransparency();
|
---|
| | 88 | }
|
---|
| | 89 |
|
---|
| | 90 | virtual void OnPlacePresize(Point pt, TileIndex tile_from)
|
---|
| | 91 | @@ -348,6 +358,7 @@
|
---|
| | 92 | if (!Company::IsValidID(_local_company)) return NULL;
|
---|
| | 93 |
|
---|
| | 94 | DeleteWindowByClass(WC_BUILD_TOOLBAR);
|
---|
| | 95 | + StopTempTransparency();
|
---|
| | 96 | return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
|
---|
| | 97 | }
|
---|
| | 98 |
|
---|
| | 99 | @@ -407,7 +418,9 @@
|
---|