Changeset - r16050:f8b5963745b7
[Not reviewed]
master
0 11 0
smatz - 14 years ago 2010-09-06 14:14:09
smatz@openttd.org
(svn r20753) -Feature [FS#3999]: make it possible to select vehicle to clone and vehicle to clone orders from directly from vehicle lists and depot window
11 files changed with 77 insertions and 111 deletions:
0 comments (0 inline, 0 general)
src/depot_gui.cpp
Show inline comments
 
@@ -483,36 +483,32 @@ struct DepotWindow : Window {
 
	void DepotClick(int x, int y)
 
	{
 
		GetDepotVehiclePtData gdvp = { NULL, NULL };
 
		const Vehicle *v = NULL;
 
		DepotGUIAction mode = this->GetVehicleFromDepotWndPt(x, y, &v, &gdvp);
 

	
 
		/* share / copy orders */
 
		if (_thd.place_mode != HT_NONE && mode != MODE_ERROR) {
 
			_place_clicked_vehicle = (this->type == VEH_TRAIN ? gdvp.head : v);
 
			return;
 
		}
 

	
 
		if (this->type == VEH_TRAIN) v = gdvp.wagon;
 

	
 
		switch (mode) {
 
			case MODE_ERROR: // invalid
 
				return;
 

	
 
			case MODE_DRAG_VEHICLE: { // start dragging of vehicle
 
				if (v != NULL && VehicleClicked(v)) return;
 

	
 
				VehicleID sel = this->sel;
 

	
 
				if (this->type == VEH_TRAIN && sel != INVALID_VEHICLE) {
 
					this->sel = INVALID_VEHICLE;
 
					TrainDepotMoveVehicle(v, sel, gdvp.head);
 
				} else if (v != NULL) {
 
					int image = v->GetImage(DIR_W);
 
					SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
 

	
 
					this->sel = v->index;
 
					this->SetDirty();
 
					SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
 

	
 
					switch (v->type) {
 
						case VEH_TRAIN:
 
							_cursor.short_vehicle_offset = 16 - Train::From(v)->tcache.cached_veh_length * 2;
 
							break;
 

	
 
@@ -538,31 +534,12 @@ struct DepotWindow : Window {
 
				break;
 

	
 
			default: NOT_REACHED();
 
		}
 
	}
 

	
 
	/**
 
	 * Clones a vehicle
 
	 * @param *v is the original vehicle to clone
 
	 */
 
	void HandleCloneVehClick(const Vehicle *v)
 
	{
 
		if (v == NULL || !IsCompanyBuildableVehicleType(v)) return;
 

	
 
		if (!v->IsPrimaryVehicle()) {
 
			v = v->First();
 
			/* Do nothing when clicking on a train in depot with no loc attached */
 
			if (v->type == VEH_TRAIN && !Train::From(v)->IsFrontEngine()) return;
 
		}
 

	
 
		DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle);
 

	
 
		ResetObjectToPlace();
 
	}
 

	
 
	/* Function to set up vehicle specific widgets (mainly sprites and strings).
 
	 * Only use this if it's the same widget, that's used for more than one vehicle type and it needs different text/sprites
 
	 * Vehicle specific text/sprites, that's in a widget, that's only shown for one vehicle type (like sell whole train) is set in the nested widget array
 
	 */
 
	void SetupWidgetData(VehicleType type)
 
	{
 
@@ -739,14 +716,13 @@ struct DepotWindow : Window {
 
				if (this->IsWidgetLowered(DEPOT_WIDGET_CLONE)) {
 
					static const CursorID clone_icons[] = {
 
						SPR_CURSOR_CLONE_TRAIN, SPR_CURSOR_CLONE_ROADVEH,
 
						SPR_CURSOR_CLONE_SHIP, SPR_CURSOR_CLONE_AIRPLANE
 
					};
 

	
 
					_place_clicked_vehicle = NULL;
 
					SetObjectToPlaceWnd(clone_icons[this->type], PAL_NONE, HT_RECT, this);
 
					SetObjectToPlaceWnd(clone_icons[this->type], PAL_NONE, HT_VEHICLE, this);
 
				} else {
 
					ResetObjectToPlace();
 
				}
 
				break;
 

	
 
			case DEPOT_WIDGET_LOCATION:
 
@@ -857,17 +833,21 @@ struct DepotWindow : Window {
 
		args[1] = (uint64)(size_t)details;
 
		GuiShowTooltips(whole_chain ? STR_DEPOT_VEHICLE_TOOLTIP_CHAIN : STR_DEPOT_VEHICLE_TOOLTIP, 2, args, TCC_RIGHT_CLICK);
 

	
 
		return true;
 
	}
 

	
 
	virtual void OnPlaceObject(Point pt, TileIndex tile)
 
	/**
 
	 * Clones a vehicle
 
	 * @param v the original vehicle to clone
 
	 */
 
	virtual void OnVehicleSelect(const Vehicle *v)
 
	{
 
		const Vehicle *v = CheckMouseOverVehicle();
 

	
 
		if (v != NULL) this->HandleCloneVehClick(v);
 
		if (DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle)) {
 
			ResetObjectToPlace();
 
		}
 
	}
 

	
 
	virtual void OnPlaceObjectAbort()
 
	{
 
		/* abort clone */
 
		this->RaiseWidget(DEPOT_WIDGET_CLONE);
 
@@ -876,24 +856,12 @@ struct DepotWindow : Window {
 
		/* abort drag & drop */
 
		this->sel = INVALID_VEHICLE;
 
		this->vehicle_over = INVALID_VEHICLE;
 
		this->SetWidgetDirty(DEPOT_WIDGET_MATRIX);
 
	};
 

	
 
	/* check if a vehicle in a depot was clicked.. */
 
	virtual void OnMouseLoop()
 
	{
 
		const Vehicle *v = _place_clicked_vehicle;
 

	
 
		/* since OTTD checks all open depot windows, we will make sure that it triggers the one with a clicked clone button */
 
		if (v != NULL && this->IsWidgetLowered(DEPOT_WIDGET_CLONE)) {
 
			_place_clicked_vehicle = NULL;
 
			this->HandleCloneVehClick(v);
 
		}
 
	}
 

	
 
	virtual void OnMouseDrag(Point pt, int widget)
 
	{
 
		if (this->type != VEH_TRAIN || this->sel == INVALID_VEHICLE) return;
 

	
 
		/* A rail vehicle is dragged.. */
 
		if (widget != DEPOT_WIDGET_MATRIX) { // ..outside of the depot matrix.
src/group_gui.cpp
Show inline comments
 
@@ -438,12 +438,13 @@ public:
 

	
 
			case GRP_WIDGET_LIST_VEHICLE: { // Matrix Vehicle
 
				uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, GRP_WIDGET_LIST_VEHICLE);
 
				if (id_v >= this->vehicles.Length()) return; // click out of list bound
 

	
 
				const Vehicle *v = this->vehicles[id_v];
 
				if (VehicleClicked(v)) break;
 

	
 
				this->vehicle_sel = v->index;
 

	
 
				SetObjectToPlaceWnd(v->GetImage(DIR_W), GetVehiclePalette(v), HT_DRAG, this);
 
				_cursor.vehchain = true;
 

	
 
@@ -528,13 +529,13 @@ public:
 
				this->SetDirty();
 

	
 
				uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, GRP_WIDGET_LIST_VEHICLE);
 
				if (id_v >= this->vehicles.Length()) return; // click out of list bound
 

	
 
				const Vehicle *v = this->vehicles[id_v];
 
				if (vindex == v->index) {
 
				if (!VehicleClicked(v) && vindex == v->index) {
 
					ShowVehicleViewWindow(v);
 
				}
 
				break;
 
			}
 
		}
 
		_cursor.vehchain = false;
src/order_gui.cpp
Show inline comments
 
@@ -494,45 +494,22 @@ private:
 

	
 
		sel += this->vscroll->GetPosition();
 

	
 
		return (sel <= vehicle->GetNumOrders() && sel >= 0) ? sel : INVALID_ORDER;
 
	}
 

	
 
	bool HandleOrderVehClick(const Vehicle *u)
 
	{
 
		if (u->type != this->vehicle->type) return false;
 

	
 
		if (!u->IsPrimaryVehicle()) {
 
			u = u->First();
 
			if (!u->IsPrimaryVehicle()) return false;
 
		}
 

	
 
		/* v is vehicle getting orders. Only copy/clone orders if vehicle doesn't have any orders yet
 
		 * obviously if you press CTRL on a non-empty orders vehicle you know what you are doing */
 
		if (this->vehicle->GetNumOrders() != 0 && _ctrl_pressed == 0) return false;
 

	
 
		if (DoCommandP(this->vehicle->tile, this->vehicle->index | (_ctrl_pressed ? CO_SHARE : CO_COPY) << 30, u->index,
 
				_ctrl_pressed ? CMD_CLONE_ORDER | CMD_MSG(STR_ERROR_CAN_T_SHARE_ORDER_LIST) : CMD_CLONE_ORDER | CMD_MSG(STR_ERROR_CAN_T_COPY_ORDER_LIST))) {
 
			this->selected_order = -1;
 
			ResetObjectToPlace();
 
		}
 

	
 
		return true;
 
	}
 

	
 
	/**
 
	 * Handle the click on the goto button.
 
	 * @param i Dummy parameter.
 
	 */
 
	void OrderClick_Goto(int i)
 
	{
 
		this->SetWidgetDirty(ORDER_WIDGET_GOTO);
 
		this->ToggleWidgetLoweredState(ORDER_WIDGET_GOTO);
 
		if (this->IsWidgetLowered(ORDER_WIDGET_GOTO)) {
 
			_place_clicked_vehicle = NULL;
 
			SetObjectToPlaceWnd(ANIMCURSOR_PICKSTATION, PAL_NONE, HT_RECT, this);
 
			SetObjectToPlaceWnd(ANIMCURSOR_PICKSTATION, PAL_NONE, HT_RECT | HT_VEHICLE, this);
 
			this->goto_type = OPOS_GOTO;
 
		} else {
 
			ResetObjectToPlace();
 
		}
 
	}
 

	
 
@@ -1257,26 +1234,36 @@ public:
 
		return CheckHotkeyMatch<OrdersWindow>(order_hotkeys, keycode, this) != -1 ? ES_HANDLED : ES_NOT_HANDLED;
 
	}
 

	
 
	virtual void OnPlaceObject(Point pt, TileIndex tile)
 
	{
 
		if (this->goto_type == OPOS_GOTO) {
 
			/* check if we're clicking on a vehicle first.. clone orders in that case. */
 
			const Vehicle *v = CheckMouseOverVehicle();
 
			if (v != NULL && this->HandleOrderVehClick(v)) return;
 

	
 
			const Order cmd = GetOrderCmdFromTile(this->vehicle, tile);
 
			if (cmd.IsType(OT_NOTHING)) return;
 

	
 
			if (DoCommandP(this->vehicle->tile, this->vehicle->index + (this->OrderGetSel() << 20), cmd.Pack(), CMD_INSERT_ORDER | CMD_MSG(STR_ERROR_CAN_T_INSERT_NEW_ORDER))) {
 
				/* With quick goto the Go To button stays active */
 
				if (!_settings_client.gui.quick_goto) ResetObjectToPlace();
 
			}
 
		}
 
	}
 

	
 
	virtual void OnVehicleSelect(const Vehicle *v)
 
	{
 
		/* v is vehicle getting orders. Only copy/clone orders if vehicle doesn't have any orders yet
 
		 * obviously if you press CTRL on a non-empty orders vehicle you know what you are doing
 
		 * TODO: give a warning message */
 
		if (this->vehicle->GetNumOrders() != 0 && _ctrl_pressed == 0) return;
 

	
 
		if (DoCommandP(this->vehicle->tile, this->vehicle->index | (_ctrl_pressed ? CO_SHARE : CO_COPY) << 30, v->index,
 
				_ctrl_pressed ? CMD_CLONE_ORDER | CMD_MSG(STR_ERROR_CAN_T_SHARE_ORDER_LIST) : CMD_CLONE_ORDER | CMD_MSG(STR_ERROR_CAN_T_COPY_ORDER_LIST))) {
 
			this->selected_order = -1;
 
			ResetObjectToPlace();
 
		}
 
	}
 

	
 
	virtual void OnPlaceObjectAbort()
 
	{
 
		if (this->goto_type == OPOS_CONDITIONAL) {
 
			this->goto_type = OPOS_GOTO;
 
			NWidgetBase *nwid = this->GetWidget<NWidgetBase>(ORDER_WIDGET_ORDER_LIST);
 
			if (IsInsideBS(_cursor.pos.x, this->left + nwid->pos_x, nwid->current_x) && IsInsideBS(_cursor.pos.y, this->top + nwid->pos_y, nwid->current_y)) {
 
@@ -1298,29 +1285,12 @@ public:
 
		if (this->order_over != INVALID_ORDER) {
 
			this->order_over = INVALID_ORDER;
 
			this->SetWidgetDirty(ORDER_WIDGET_ORDER_LIST);
 
		}
 
	}
 

	
 
	virtual void OnMouseLoop()
 
	{
 
		const Vehicle *v = _place_clicked_vehicle;
 
		/*
 
		 * Check if we clicked on a vehicle
 
		 * and if the GOTO button of this window is pressed
 
		 * This is because of all open order windows WE_MOUSELOOP is called
 
		 * and if you have 3 windows open, and this check is not done
 
		 * the order is copied to the last open window instead of the
 
		 * one where GOTO is enabled
 
		 */
 
		if (v != NULL && this->IsWidgetLowered(ORDER_WIDGET_GOTO)) {
 
			_place_clicked_vehicle = NULL;
 
			this->HandleOrderVehClick(v);
 
		}
 
	}
 

	
 
	virtual void OnMouseDrag(Point pt, int widget)
 
	{
 
		if (this->selected_order != -1 && widget == ORDER_WIDGET_ORDER_LIST) {
 
			/* An order is dragged.. */
 
			OrderID from_order = this->OrderGetSel();
 
			OrderID to_order = this->GetOrderFromPt(pt.y);
src/tilehighlight_type.h
Show inline comments
 
@@ -16,20 +16,21 @@
 
#include "window_type.h"
 
#include "tile_type.h"
 
#include "viewport_type.h"
 

	
 
/** Highlighting draw styles */
 
enum HighLightStyle {
 
	HT_NONE      = 0x00, ///< default
 
	HT_RECT      = 0x10, ///< rectangle (stations, depots, ...)
 
	HT_POINT     = 0x20, ///< point (lower land, raise land, level land, ...)
 
	HT_SPECIAL   = 0x30, ///< special mode used for highlighting while dragging (and for tunnels/docks)
 
	HT_DRAG      = 0x40, ///< dragging items in the depot windows
 
	HT_LINE      = 0x08, ///< used for autorail highlighting (longer streches), lower bits: direction
 
	HT_RAIL      = 0x80, ///< autorail (one piece), lower bits: direction
 
	HT_DRAG_MASK = 0xF8, ///< masks the drag-type
 
	HT_NONE      = 0x000, ///< default
 
	HT_RECT      = 0x010, ///< rectangle (stations, depots, ...)
 
	HT_POINT     = 0x020, ///< point (lower land, raise land, level land, ...)
 
	HT_SPECIAL   = 0x030, ///< special mode used for highlighting while dragging (and for tunnels/docks)
 
	HT_DRAG      = 0x040, ///< dragging items in the depot windows
 
	HT_LINE      = 0x008, ///< used for autorail highlighting (longer streches), lower bits: direction
 
	HT_RAIL      = 0x080, ///< autorail (one piece), lower bits: direction
 
	HT_VEHICLE   = 0x100, ///< vehicle is accepted as target as well (bitmask)
 
	HT_DRAG_MASK = 0x0F8, ///< masks the drag-type
 

	
 
	/* lower bits (used with HT_LINE and HT_RAIL):
 
	 * (see ASCII art in autorail.h for a visual interpretation) */
 
	HT_DIR_X  = 0,    ///< X direction
 
	HT_DIR_Y  = 1,    ///< Y direction
 
	HT_DIR_HU = 2,    ///< horizontal upper
src/vehicle.cpp
Show inline comments
 
@@ -52,13 +52,12 @@
 

	
 
#include "table/strings.h"
 

	
 
#define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6))
 

	
 
VehicleID _vehicle_id_ctr_day;
 
const Vehicle *_place_clicked_vehicle;
 
VehicleID _new_vehicle_id;
 
uint16 _returned_refit_capacity;
 
byte _age_cargo_skip_counter; ///< Skip aging of cargo?
 

	
 

	
 
/* Initialize the vehicle-pool */
src/vehicle_func.h
Show inline comments
 
@@ -159,13 +159,12 @@ static inline uint32 GetCmdSendToDepot(c
 

	
 
CommandCost EnsureNoVehicleOnGround(TileIndex tile);
 
CommandCost EnsureNoTrainOnTrackBits(TileIndex tile, TrackBits track_bits);
 
void StopAllVehicles();
 

	
 
extern VehicleID _vehicle_id_ctr_day;
 
extern const Vehicle *_place_clicked_vehicle;
 
extern VehicleID _new_vehicle_id;
 
extern uint16 _returned_refit_capacity;
 
extern byte _age_cargo_skip_counter;
 

	
 
bool CanVehicleUseStation(EngineID engine_type, const struct Station *st);
 
bool CanVehicleUseStation(const Vehicle *v, const struct Station *st);
src/vehicle_gui.cpp
Show inline comments
 
@@ -36,12 +36,13 @@
 
#include "articulated_vehicles.h"
 
#include "spritecache.h"
 
#include "core/geometry_func.hpp"
 
#include "company_base.h"
 
#include "engine_func.h"
 
#include "station_base.h"
 
#include "tilehighlight_func.h"
 

	
 
#include "table/strings.h"
 

	
 
Sorting _sorting;
 

	
 
static GUIVehicleList::SortFunction VehicleNumberSorter;
 
@@ -1266,13 +1267,13 @@ public:
 

	
 
			case VLW_WIDGET_LIST: { // Matrix to show vehicles
 
				uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, VLW_WIDGET_LIST);
 
				if (id_v >= this->vehicles.Length()) return; // click out of list bound
 

	
 
				const Vehicle *v = this->vehicles[id_v];
 
				ShowVehicleViewWindow(v);
 
				if (!VehicleClicked(v)) ShowVehicleViewWindow(v);
 
				break;
 
			}
 

	
 
			case VLW_WIDGET_AVAILABLE_VEHICLES:
 
				ShowBuildVehicleWindow(INVALID_TILE, this->vehicle_type);
 
				break;
 
@@ -2341,12 +2342,29 @@ public:
 
/** Shows the vehicle view window of the given vehicle. */
 
void ShowVehicleViewWindow(const Vehicle *v)
 
{
 
	AllocateWindowDescFront<VehicleViewWindow>((v->type == VEH_TRAIN) ? &_train_view_desc : &_vehicle_view_desc, v->index);
 
}
 

	
 
/**
 
 * Dispatch a "vehicle selected" event if any window waits for it.
 
 * @param v selected vehicle;
 
 * @return did any window accept vehicle selection?
 
 */
 
bool VehicleClicked(const Vehicle *v)
 
{
 
	assert(v != NULL);
 
	if (!(_thd.place_mode & HT_VEHICLE)) return false;
 

	
 
	v = v->First();
 
	if (!v->IsPrimaryVehicle()) return false;
 

	
 
	FindWindowById(_thd.window_class, _thd.window_number)->OnVehicleSelect(v);
 
	return true;
 
}
 

	
 
void StopGlobalFollowVehicle(const Vehicle *v)
 
{
 
	Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
 
	if (w != NULL && w->viewport->follow_vehicle == v->index) {
 
		ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos, true); // lock the main view on the vehicle's last position
 
		w->viewport->follow_vehicle = INVALID_VEHICLE;
src/vehicle_gui.h
Show inline comments
 
@@ -104,11 +104,12 @@ static inline WindowClass GetWindowClass
 
		case VEH_AIRCRAFT: return WC_AIRCRAFT_LIST;
 
	}
 
}
 

	
 
/* Unified window procedure */
 
void ShowVehicleViewWindow(const Vehicle *v);
 
bool VehicleClicked(const Vehicle *v);
 
void StartStopVehicle(const Vehicle *v, bool texteffect);
 

	
 
Vehicle *CheckClickOnVehicle(const struct ViewPort *vp, int x, int y);
 

	
 
#endif /* VEHICLE_GUI_H */
src/viewport.cpp
Show inline comments
 
@@ -1802,20 +1802,25 @@ static bool CheckClickOnLandscape(const 
 
	return true;
 
}
 

	
 

	
 
bool HandleViewportClicked(const ViewPort *vp, int x, int y)
 
{
 
	const Vehicle *v;
 
	const Vehicle *v = CheckClickOnVehicle(vp, x, y);
 

	
 
	if (_thd.place_mode & HT_VEHICLE) {
 
		if (v != NULL && VehicleClicked(v)) return true;
 
	}
 

	
 
	if (_thd.place_mode & HT_DRAG_MASK) return false;
 

	
 
	if (CheckClickOnTown(vp, x, y)) return true;
 
	if (CheckClickOnStation(vp, x, y)) return true;
 
	if (CheckClickOnSign(vp, x, y)) return true;
 
	CheckClickOnLandscape(vp, x, y);
 

	
 
	v = CheckClickOnVehicle(vp, x, y);
 
	if (v != NULL) {
 
		DEBUG(misc, 2, "Vehicle %d (index %d) at %p", v->unitnumber, v->index, v);
 
		if (IsCompanyBuildableVehicleType(v)) {
 
			v = v->First();
 
			if (_ctrl_pressed && v->owner == _local_company) {
 
				StartStopVehicle(v, true);
 
@@ -1968,13 +1973,13 @@ void UpdateTileSelection()
 
			_thd.new_pos.x = x1;
 
			_thd.new_pos.y = y1;
 
			_thd.new_size.x = x2 - x1 + TILE_SIZE;
 
			_thd.new_size.y = y2 - y1 + TILE_SIZE;
 
			_thd.new_drawstyle = _thd.next_drawstyle;
 
		}
 
	} else if (_thd.place_mode != HT_NONE) {
 
	} else if ((_thd.place_mode & HT_DRAG_MASK) != HT_NONE) {
 
		Point pt = GetTileBelowCursor();
 
		x1 = pt.x;
 
		y1 = pt.y;
 
		if (x1 != -1) {
 
			switch (_thd.place_mode & HT_DRAG_MASK) {
 
				case HT_RECT:
src/window.cpp
Show inline comments
 
@@ -2201,19 +2201,17 @@ static void MouseLoop(MouseClick click, 
 
						_cursor.sprite != SPR_CURSOR_SIGN &&
 
						_pause_mode != PM_UNPAUSED &&
 
						!_cheats.build_in_pause.value) {
 
					return;
 
				}
 

	
 
				if (_thd.place_mode == HT_NONE) {
 
					if (!HandleViewportClicked(vp, x, y) &&
 
							!(w->flags4 & WF_DISABLE_VP_SCROLL) &&
 
							_settings_client.gui.left_mouse_btn_scrolling) {
 
						_scrolling_viewport = true;
 
						_cursor.fix_at = false;
 
					}
 
				if (!HandleViewportClicked(vp, x, y) &&
 
						!(w->flags4 & WF_DISABLE_VP_SCROLL) &&
 
						_settings_client.gui.left_mouse_btn_scrolling) {
 
					_scrolling_viewport = true;
 
					_cursor.fix_at = false;
 
				} else {
 
					PlaceObject();
 
				}
 
				break;
 

	
 
			case MC_RIGHT:
src/window_gui.h
Show inline comments
 
@@ -633,12 +633,18 @@ public:
 
	 * @param pt   the exact point on the map that has been clicked.
 
	 * @param tile the tile on the map that has been clicked.
 
	 */
 
	virtual void OnPlaceObject(Point pt, TileIndex tile) {}
 

	
 
	/**
 
	 * The user clicked on a vehicle while HT_VEHICLE has been set.
 
	 * @param v clicked vehicle. It is guaranteed to be v->IsPrimaryVehicle() == true
 
	 */
 
	virtual void OnVehicleSelect(const struct Vehicle *v) {}
 

	
 
	/**
 
	 * The user cancelled a tile highlight mode that has been set.
 
	 */
 
	virtual void OnPlaceObjectAbort() {}
 

	
 

	
 
	/**
0 comments (0 inline, 0 general)