src/dock_gui.cpp
branchcpp_gui
changeset 6235 5077e6ed3788
parent 6144 5a0ffbf27ced
child 6241 6a7a41b0cd32
equal deleted inserted replaced
6234:42bf2d268a86 6235:5077e6ed3788
   158 			}
   158 			}
   159 		}
   159 		}
   160 		break;
   160 		break;
   161 
   161 
   162 	case WE_ABORT_PLACE_OBJ:
   162 	case WE_ABORT_PLACE_OBJ:
   163 		RaiseWindowButtons(w);
   163 		w->RaiseButtons();
   164 
   164 
   165 		w = FindWindowById(WC_BUILD_STATION, 0);
   165 		w = Window::FindById(WC_BUILD_STATION, 0);
   166 		if (w != NULL) WP(w,def_d).close = true;
   166 		if (w != NULL) WP(w,def_d).close = true;
   167 
   167 
   168 		w = FindWindowById(WC_BUILD_DEPOT, 0);
   168 		w = Window::FindById(WC_BUILD_DEPOT, 0);
   169 		if (w != NULL) WP(w,def_d).close = true;
   169 		if (w != NULL) WP(w,def_d).close = true;
   170 		break;
   170 		break;
   171 
   171 
   172 	case WE_PLACE_PRESIZE: {
   172 	case WE_PLACE_PRESIZE: {
   173 		TileIndex tile_from;
   173 		TileIndex tile_from;
   248 			case 4:
   248 			case 4:
   249 				RaiseWindowWidget(w, _station_show_coverage + 3);
   249 				RaiseWindowWidget(w, _station_show_coverage + 3);
   250 				_station_show_coverage = (e->we.click.widget != 3);
   250 				_station_show_coverage = (e->we.click.widget != 3);
   251 				LowerWindowWidget(w, _station_show_coverage + 3);
   251 				LowerWindowWidget(w, _station_show_coverage + 3);
   252 				SndPlayFx(SND_15_BEEP);
   252 				SndPlayFx(SND_15_BEEP);
   253 				SetWindowDirty(w);
   253 				w->SetDirty();
   254 				break;
   254 				break;
   255 		}
   255 		}
   256 		break;
   256 		break;
   257 
   257 
   258 	case WE_MOUSELOOP:
   258 	case WE_MOUSELOOP:
   259 		if (WP(w,def_d).close) {
   259 		if (WP(w,def_d).close) {
   260 			DeleteWindow(w);
   260 			w->Close();
   261 			return;
   261 			return;
   262 		}
   262 		}
   263 
   263 
   264 		CheckRedrawStationCoverage(w);
   264 		CheckRedrawStationCoverage(w);
   265 		break;
   265 		break;
   323 			RaiseWindowWidget(w, _ship_depot_direction + 3);
   323 			RaiseWindowWidget(w, _ship_depot_direction + 3);
   324 			_ship_depot_direction = (e->we.click.widget == 3 ? AXIS_X : AXIS_Y);
   324 			_ship_depot_direction = (e->we.click.widget == 3 ? AXIS_X : AXIS_Y);
   325 			LowerWindowWidget(w, _ship_depot_direction + 3);
   325 			LowerWindowWidget(w, _ship_depot_direction + 3);
   326 			SndPlayFx(SND_15_BEEP);
   326 			SndPlayFx(SND_15_BEEP);
   327 			UpdateDocksDirection();
   327 			UpdateDocksDirection();
   328 			SetWindowDirty(w);
   328 			w->SetDirty();
   329 			break;
   329 			break;
   330 		}
   330 		}
   331 	} break;
   331 	} break;
   332 
   332 
   333 	case WE_MOUSELOOP:
   333 	case WE_MOUSELOOP:
   334 		if (WP(w,def_d).close) DeleteWindow(w);
   334 		if (WP(w,def_d).close) w->Close();
   335 		break;
   335 		break;
   336 
   336 
   337 	case WE_DESTROY:
   337 	case WE_DESTROY:
   338 		if (!WP(w,def_d).close) ResetObjectToPlace();
   338 		if (!WP(w,def_d).close) ResetObjectToPlace();
   339 		break;
   339 		break;