From a8080b62563dcb9f3e3bf5180ebf2de6cf6b68ae Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 1 Feb 2015 20:54:24 +0000 Subject: (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). --- src/ship_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ship_gui.cpp') diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index 4db55215c..7ad2e8473 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -38,17 +38,17 @@ void DrawShipImage(const Vehicle *v, int left, int right, int y, VehicleID selec SpriteID sprite = v->GetImage(rtl ? DIR_E : DIR_W, image_type); const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL); - int width = UnScaleByZoom(real_sprite->width, ZOOM_LVL_GUI); - int x_offs = UnScaleByZoom(real_sprite->x_offs, ZOOM_LVL_GUI); + int width = UnScaleGUI(real_sprite->width); + int x_offs = UnScaleGUI(real_sprite->x_offs); int x = rtl ? right - width - x_offs : left - x_offs; - y += UnScaleByZoom(4 * 10, ZOOM_LVL_GUI); + y += ScaleGUITrad(10); DrawSprite(sprite, GetVehiclePalette(v), x, y); if (v->index == selection) { x += x_offs; - 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); + y += UnScaleGUI(real_sprite->y_offs); + DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(real_sprite->height) + 1, COLOUR_WHITE, FR_BORDERONLY); } } -- cgit v1.2.3-54-g00ecf