From 943586016d8acac3bd83c2c3eb1649c4c24b1095 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 5 Sep 2020 14:02:18 +0100 Subject: [PATCH] TBTR: Adjust train sprite bounds and position in main window See: #186 --- src/tbtr_template_vehicle_func.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tbtr_template_vehicle_func.cpp b/src/tbtr_template_vehicle_func.cpp index 618fbf46b7..d17e0de059 100644 --- a/src/tbtr_template_vehicle_func.cpp +++ b/src/tbtr_template_vehicle_func.cpp @@ -115,7 +115,8 @@ void DrawTemplate(const TemplateVehicle *tv, int left, int right, int y) DrawPixelInfo tmp_dpi, *old_dpi; int max_width = right - left + 1; int height = ScaleGUITrad(14); - if (!FillDrawPixelInfo(&tmp_dpi, left, y, max_width, height)) return; + int padding = ScaleGUITrad(1); + if (!FillDrawPixelInfo(&tmp_dpi, left, y - padding, max_width, height + (2 * padding))) return; old_dpi = _cur_dpi; _cur_dpi = &tmp_dpi; @@ -125,7 +126,7 @@ void DrawTemplate(const TemplateVehicle *tv, int left, int right, int y) while (t) { PaletteID pal = GetEnginePalette(t->engine_type, _current_company); - t->sprite_seq.Draw(offset + t->image_dimensions.GetOffsetX(), t->image_dimensions.GetOffsetY() + ScaleGUITrad(11), pal, false); + t->sprite_seq.Draw(offset + t->image_dimensions.GetOffsetX(), t->image_dimensions.GetOffsetY() + ScaleGUITrad(10), pal, false); offset += t->image_dimensions.GetDisplayImageWidth(); t = t->Next();