src/depot_gui.cpp
changeset 9670 ce7645fdaed5
parent 9396 3f70b1b8642c
child 9751 9e9c726170cc
equal deleted inserted replaced
9669:da2ecea5561e 9670:ce7645fdaed5
   511 					int image = v->GetImage(DIR_W);
   511 					int image = v->GetImage(DIR_W);
   512 
   512 
   513 					this->sel = v->index;
   513 					this->sel = v->index;
   514 					this->SetDirty();
   514 					this->SetDirty();
   515 					SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, this);
   515 					SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, this);
       
   516 
       
   517 					switch (v->type) {
       
   518 						case VEH_TRAIN:
       
   519 							_cursor.short_vehicle_offset = 16 - v->u.rail.cached_veh_length * 2;
       
   520 							break;
       
   521 
       
   522 						case VEH_ROAD:
       
   523 							_cursor.short_vehicle_offset = 16 - v->u.road.cached_veh_length * 2;
       
   524 							break;
       
   525 
       
   526 						default:
       
   527 							_cursor.short_vehicle_offset = 0;
       
   528 							break;
       
   529 					}
   516 					_cursor.vehchain = _ctrl_pressed;
   530 					_cursor.vehchain = _ctrl_pressed;
   517 				}
   531 				}
   518 			} break;
   532 			} break;
   519 
   533 
   520 			case MODE_SHOW_VEHICLE: // show info window
   534 			case MODE_SHOW_VEHICLE: // show info window