summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-10-04 16:40:23 +0000
committerpeter1138 <peter1138@openttd.org>2014-10-04 16:40:23 +0000
commitce9fab58bc02cda3fde8d3cb42fd88f25889b340 (patch)
tree7b92188f2ac8622c17ee45cd6c54bd16196c064c /src/roadveh_cmd.cpp
parent587ad940cc46ffb573e080320bac51085994b7f7 (diff)
downloadopenttd-ce9fab58bc02cda3fde8d3cb42fd88f25889b340.tar.xz
(svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index d1d5a0c23..3f9d3616f 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -107,10 +107,10 @@ int RoadVehicle::GetDisplayImageWidth(Point *offset) const
int reference_width = ROADVEHINFO_DEFAULT_VEHICLE_WIDTH;
if (offset != NULL) {
- offset->x = reference_width / 2;
+ offset->x = UnScaleByZoom(2 * reference_width, ZOOM_LVL_GUI);
offset->y = 0;
}
- return this->gcache.cached_veh_length * reference_width / VEHICLE_LENGTH;
+ return UnScaleByZoom(4 * this->gcache.cached_veh_length * reference_width / VEHICLE_LENGTH, ZOOM_LVL_GUI);
}
static SpriteID GetRoadVehIcon(EngineID engine, EngineImageType image_type)