diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 665f79bd7a..e60c36899a 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1452,6 +1452,16 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int DrawVehicleImage(v, image_left, image_right, y + FONT_HEIGHT_SMALL - 1, selected_vehicle, EIT_IN_LIST, 0); DrawString(text_left, text_right, y + line_height - FONT_HEIGHT_SMALL - WD_FRAMERECT_BOTTOM - 1, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR); + /* company colour stripe along vehicle description row */ + if (_settings_game.economy.infrastructure_sharing[VEH_TRAIN] || _settings_game.economy.infrastructure_sharing[VEH_ROAD] || _settings_game.economy.infrastructure_sharing[VEH_SHIP] || _settings_game.economy.infrastructure_sharing[VEH_AIRCRAFT]) { + byte ccolour = 0; + Company *c = Company::Get(v->owner); + if (c != NULL) { + ccolour = _colour_gradient[c->colour][6]; + } + GfxFillRect(text_left, y, text_right, y + FONT_HEIGHT_SMALL - 2, ccolour, FILLRECT_OPAQUE); + } + if (v->name != NULL) { /* The vehicle got a name so we will print it */ SetDParam(0, v->index);