summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-23 18:13:24 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-23 18:13:24 +0000
commit61611711e39630308b0742fb890a2fc240d6ddc7 (patch)
tree16abfe336e37ba9af9b92ca92f778be77e7c68a0 /vehicle_gui.c
parentba60e4ac3428f20f74e635ea9ac1f729e1aa16a9 (diff)
downloadopenttd-61611711e39630308b0742fb890a2fc240d6ddc7.tar.xz
(svn r6908) - Codechange: Modify DrawStringMultiLine() to return the number of pixel lines used, and use it for drawing NewGRF additional text (mart3p)
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 9d8faa19a..b1b455b65 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -482,13 +482,14 @@ void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order)
}
/* Display additional text from NewGRF in the purchase information window */
-int ShowAdditionalText(int x, int y, int w, EngineID engine)
+uint ShowAdditionalText(int x, int y, int w, EngineID engine)
{
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ADDITIONAL_TEXT, 0, 0, engine, NULL);
if (callback == CALLBACK_FAILED) return 0;
- DrawStringTruncated(x, y, GetGRFStringID(GetEngineGRFID(engine), 0xD000 + callback), 16, w);
- return 10;
+ // STR_02BD is used to start the string with {BLACK}
+ SetDParam(0, GetGRFStringID(GetEngineGRFID(engine), 0xD000 + callback));
+ return DrawStringMultiLine(x, y, STR_02BD, w);
}