Draw vehicles vertically aligned on vehicle list, vehicle info panel, etc.

This commit is contained in:
Juanjo
2013-07-16 21:50:42 +02:00
committed by pelya
parent a315c978f6
commit 1fe633b7b7
4 changed files with 23 additions and 19 deletions

View File

@@ -434,8 +434,8 @@ struct NewGRFInspectWindow : Window {
GrfSpecFeature f = GetFeatureNum(this->window_number);
int h = GetVehicleImageCellSize((VehicleType)(VEH_TRAIN + (f - GSF_TRAINS)), EIT_IN_DEPOT).height;
int y = (r.top + r.bottom - h) / 2;
DrawVehicleImage(v->First(), r.left + WD_BEVEL_LEFT, r.right - WD_BEVEL_RIGHT, y + 1, INVALID_VEHICLE, EIT_IN_DETAILS, skip);
int y = Center(r.top, r.bottom - r.top, h);
DrawVehicleImage(v->First(), r.left + WD_BEVEL_LEFT, r.right - WD_BEVEL_RIGHT, y + 1, h, INVALID_VEHICLE, EIT_IN_DETAILS, skip);
/* Highlight the articulated part (this is different to the whole-vehicle highlighting of DrawVehicleImage */
if (_current_text_dir == TD_RTL) {