summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-07-07 20:00:04 +0000
committerfrosch <frosch@openttd.org>2010-07-07 20:00:04 +0000
commitedcc7f3cbcd18763d5593d1ca27a8b688ea13fc9 (patch)
treeaf544425abbab4bc7a418183f62fcd67336dfdab
parent0bae69b12b1226e8660c1d8746b2653b5fde009b (diff)
downloadopenttd-edcc7f3cbcd18763d5593d1ca27a8b688ea13fc9.tar.xz
(svn r20086) -Add: Textstack support for CB 38.
-rw-r--r--src/industry_gui.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 7a032b813..b226c7f49 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -433,15 +433,13 @@ public:
uint16 callback_res = GetIndustryCallback(CBID_INDUSTRY_FUND_MORE_TEXT, 0, 0, NULL, this->selected_type, INVALID_TILE);
if (callback_res != CALLBACK_FAILED) { // Did it fail?
str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string
+ if (str != STR_UNDEFINED) {
+ PrepareTextRefStackUsage(6);
+ DrawStringMultiLine(left, right, y, bottom, str);
+ StopTextRefStackUsage();
+ }
}
}
-
- /* Draw the Additional purchase text, provided by newgrf callback, if any.
- * Otherwhise, will print Nothing */
- if (str != STR_NULL && str != STR_UNDEFINED) {
- SetDParam(0, str);
- DrawStringMultiLine(left, right, y, bottom, STR_JUST_STRING);
- }
} break;
}
}