diff options
Diffstat (limited to 'src/engine_gui.cpp')
-rw-r--r-- | src/engine_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 1c89d3a36..9dde1a7e1 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -96,7 +96,7 @@ struct EnginePreviewWindow : Window { DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_ENGINE_NAME, TC_BLACK, SA_HOR_CENTER); y += FONT_HEIGHT_NORMAL; - DrawVehicleEngine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, this->width >> 1, y + VEHICLE_SPACE / 2, engine, GetEnginePalette(engine, _local_company)); + DrawVehicleEngine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, this->width >> 1, y + VEHICLE_SPACE / 2, engine, GetEnginePalette(engine, _local_company), EIT_PREVIEW); y += VEHICLE_SPACE; DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, r.bottom, GetEngineInfoString(engine), TC_FROMSTRING, SA_CENTER); @@ -268,25 +268,25 @@ StringID GetEngineInfoString(EngineID engine) * @param engine Engine to draw. * @param pal Palette to use for drawing. */ -void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal) +void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type) { const Engine *e = Engine::Get(engine); switch (e->type) { case VEH_TRAIN: - DrawTrainEngine(left, right, preferred_x, y, engine, pal); + DrawTrainEngine(left, right, preferred_x, y, engine, pal, image_type); break; case VEH_ROAD: - DrawRoadVehEngine(left, right, preferred_x, y, engine, pal); + DrawRoadVehEngine(left, right, preferred_x, y, engine, pal, image_type); break; case VEH_SHIP: - DrawShipEngine(left, right, preferred_x, y, engine, pal); + DrawShipEngine(left, right, preferred_x, y, engine, pal, image_type); break; case VEH_AIRCRAFT: - DrawAircraftEngine(left, right, preferred_x, y, engine, pal); + DrawAircraftEngine(left, right, preferred_x, y, engine, pal, image_type); break; default: NOT_REACHED(); |