(svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists.

This commit is contained in:
peter1138
2014-10-04 16:40:23 +00:00
parent 587ad940cc
commit ce9fab58bc
10 changed files with 73 additions and 56 deletions

View File

@@ -42,11 +42,12 @@ void DrawShipImage(const Vehicle *v, int left, int right, int y, VehicleID selec
int x_offs = UnScaleByZoom(real_sprite->x_offs, ZOOM_LVL_GUI);
int x = rtl ? right - width - x_offs : left - x_offs;
DrawSprite(sprite, GetVehiclePalette(v), x, y + 10);
y += UnScaleByZoom(4 * 10, ZOOM_LVL_GUI);
DrawSprite(sprite, GetVehiclePalette(v), x, y);
if (v->index == selection) {
x += x_offs;
y += UnScaleByZoom(real_sprite->y_offs, ZOOM_LVL_GUI) + 10;
y += UnScaleByZoom(real_sprite->y_offs, ZOOM_LVL_GUI);
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleByZoom(real_sprite->height, ZOOM_LVL_GUI) + 1, COLOUR_WHITE, FR_BORDERONLY);
}
}