summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-21 20:12:12 +0000
committerrubidium <rubidium@openttd.org>2009-03-21 20:12:12 +0000
commit45f189fdcaedd5f95dcbb3ce9a60f746603859e1 (patch)
tree963e15fde656667f8ede17763a536b8ec0282ff9 /src/build_vehicle_gui.cpp
parent9fcff01850c4c18543c60cf477926b793052f1fd (diff)
downloadopenttd-45f189fdcaedd5f95dcbb3ce9a60f746603859e1.tar.xz
(svn r15785) -Codechange: remove the *Truncated part of the old text drawing API.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 639eade40..92d3c36cf 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -668,19 +668,17 @@ void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *
default: NOT_REACHED();
}
- uint maxw = r - x - x_offset;
-
for (; min < max; min++, y += step_size) {
const EngineID engine = (*eng_list)[min];
/* Note: num_engines is only used in the autoreplace GUI, so it is correct to use _local_company here. */
const uint num_engines = GetGroupNumEngines(_local_company, selected_group, engine);
SetDParam(0, engine);
- DrawStringTruncated(x + x_offset, y, STR_ENGINE_NAME, engine == selected_id ? TC_WHITE : TC_BLACK, maxw);
+ DrawString(x + x_offset, r, y, STR_ENGINE_NAME, engine == selected_id ? TC_WHITE : TC_BLACK);
DrawVehicleEngine(type, x, y + y_offset, engine, (count_location != 0 && num_engines == 0) ? PALETTE_CRASH : GetEnginePalette(engine, _local_company));
if (count_location != 0) {
SetDParam(0, num_engines);
- DrawStringRightAligned(count_location, y + (GetVehicleListHeight(type) == 14 ? 3 : 8), STR_TINY_BLACK, TC_FROMSTRING);
+ DrawString(x, count_location, y + (GetVehicleListHeight(type) == 14 ? 3 : 8), STR_TINY_BLACK, TC_FROMSTRING, SA_RIGHT);
}
}
}