Ejemplo n.º 1
0
	virtual void OnPlaceObject(Point pt, TileIndex tile)
	{
		switch (this->last_user_action) {
			case ATW_AIRPORT:
				PlaceAirport(tile);
				break;

			case ATW_DEMOLISH:
				PlaceProc_DemolishArea(tile);
				break;

			default: NOT_REACHED();
		}
	}
Ejemplo n.º 2
0
	virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
	{
		if (pt.x == -1) return;
		MoveAllHiddenWindowsBackToScreen();
		switch (select_proc) {
			case DDSP_BUILD_STATION:
				assert(start_tile == end_tile);
				PlaceAirport(end_tile);
				break;
			case DDSP_DEMOLISH_AREA:
				GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
				break;
			default: NOT_REACHED();
		}
	}