97 DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcPlaySound10, CMD_CLEAR_AREA | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA)); |
97 DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcPlaySound10, CMD_CLEAR_AREA | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA)); |
98 } |
98 } |
99 break; |
99 break; |
100 |
100 |
101 case WE_ABORT_PLACE_OBJ: |
101 case WE_ABORT_PLACE_OBJ: |
102 RaiseWindowButtons(w); |
102 w->RaiseButtons(); |
103 |
103 |
104 w = FindWindowById(WC_BUILD_STATION, 0); |
104 w = Window::FindById(WC_BUILD_STATION, 0); |
105 if (w != 0) |
105 if (w != 0) |
106 WP(w,def_d).close = true; |
106 WP(w,def_d).close = true; |
107 break; |
107 break; |
108 |
108 |
109 case WE_DESTROY: |
109 case WE_DESTROY: |
204 case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: |
204 case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: |
205 RaiseWindowWidget(w, _selected_airport_type + 7); |
205 RaiseWindowWidget(w, _selected_airport_type + 7); |
206 _selected_airport_type = e->we.click.widget - 7; |
206 _selected_airport_type = e->we.click.widget - 7; |
207 LowerWindowWidget(w, _selected_airport_type + 7); |
207 LowerWindowWidget(w, _selected_airport_type + 7); |
208 SndPlayFx(SND_15_BEEP); |
208 SndPlayFx(SND_15_BEEP); |
209 SetWindowDirty(w); |
209 w->SetDirty(); |
210 break; |
210 break; |
211 case 16: case 17: |
211 case 16: case 17: |
212 _station_show_coverage = (e->we.click.widget != 16); |
212 _station_show_coverage = (e->we.click.widget != 16); |
213 SetWindowWidgetLoweredState(w, 16, !_station_show_coverage); |
213 SetWindowWidgetLoweredState(w, 16, !_station_show_coverage); |
214 SetWindowWidgetLoweredState(w, 17, _station_show_coverage); |
214 SetWindowWidgetLoweredState(w, 17, _station_show_coverage); |
215 SndPlayFx(SND_15_BEEP); |
215 SndPlayFx(SND_15_BEEP); |
216 SetWindowDirty(w); |
216 w->SetDirty(); |
217 break; |
217 break; |
218 } |
218 } |
219 } break; |
219 } break; |
220 |
220 |
221 case WE_MOUSELOOP: { |
221 case WE_MOUSELOOP: { |
222 if (WP(w,def_d).close) { |
222 if (WP(w,def_d).close) { |
223 DeleteWindow(w); |
223 w->Close(); |
224 return; |
224 return; |
225 } |
225 } |
226 |
226 |
227 CheckRedrawStationCoverage(w); |
227 CheckRedrawStationCoverage(w); |
228 } break; |
228 } break; |