diff options
author | rubidium <rubidium@openttd.org> | 2011-11-26 12:49:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-26 12:49:54 +0000 |
commit | 61abe2910818c5f4bc304c21ecea07be65890c9d (patch) | |
tree | e3549a425c02407e82f62753f7dbdae9dd4a63ae /src | |
parent | 07633a064c062bc5e997c6aa74a48aa4a82e8cc8 (diff) | |
download | openttd-61abe2910818c5f4bc304c21ecea07be65890c9d.tar.xz |
(svn r23330) -Fix [FS#4853] (r23316): alignment of signals in the signals menu was incorrect
Diffstat (limited to 'src')
-rw-r--r-- | src/rail_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 9008ffb31..cffbeceff 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -32,6 +32,7 @@ #include "hotkeys.h" #include "engine_base.h" #include "vehicle_func.h" +#include "zoom_func.h" #include "station_map.h" #include "tunnelbridge_map.h" @@ -1539,8 +1540,8 @@ private: * for sprite drawing and add half of the sprite's width. For the y offset * we want the sprite to be aligned on the bottom, so again we undo the * offset for sprite drawing and assume it is the bottom of the sprite. */ - int sprite_center_x_offset = sprite->x_offs + sprite->width / 2; - int sprite_bottom_y_offset = sprite->height + sprite->y_offs; + int sprite_center_x_offset = UnScaleByZoom(sprite->x_offs + sprite->width / 2, ZOOM_LVL_GUI); + int sprite_bottom_y_offset = UnScaleByZoom(sprite->height + sprite->y_offs, ZOOM_LVL_GUI); /* Next we want to know where on the window to draw. Calculate the center * and the bottom of the area to draw. */ |