Old revision #p8iovjkgp | New revision #p5qn7lvhm | ||
---|---|---|---|
18 | } | 18 | } |
19 | 19 | ||
20 | /** | 20 | /** |
21 | @@ -117,6 +119,18 @@ | 21 | @@ -118,6 +120,18 @@ |
22 | { | ||
23 | if (!gui_scope) return; | 22 | if (!gui_scope) return; |
24 | 23 | ||
24 | bool can_build = CanBuildVehicleInfrastructure(VEH_SHIP); | ||
25 | + for (int i = WID_DT_CANAL; i < WID_DT_INVALID; i++) | 25 | + for (int i = WID_DT_CANAL; i < WID_DT_INVALID; i++) |
26 | + { | 26 | + { |
27 | + if (_game_mode != GM_EDITOR) { | 27 | + if (_game_mode != GM_EDITOR) { | … | … |
34 | + } | 34 | + } |
35 | + } | 35 | + } |
36 | + } | 36 | + } |
37 | |||
38 | this->SetWidgetsDisabledState(!can_build, | 37 | this->SetWidgetsDisabledState(!can_build, |
39 | WID_DT_DEPOT, | 38 | WID_DT_DEPOT, |
40 | @@ -125,7 +139,7 @@ | 40 | WID_DT_STATION, |
41 | WIDGET_LIST_END); | ||
42 | if (!can_build) { | ||
43 | DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER); | ||
44 | - DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER); | ||
45 | + DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER); | ||
46 | } | ||
47 | } | ||
48 | |||
49 | @@ -133,39 +147,45 @@ | 40 | @@ -133,39 +147,45 @@ |
50 | { | 41 | { |
51 | switch (widget) { | 42 | switch (widget) { |