summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authordP <dp@dpointer.org>2021-01-15 17:38:14 +0300
committerCharles Pigott <charlespigott@googlemail.com>2021-01-22 09:50:53 +0000
commitbab7de6cf23dce124ef8b1e284d0d1f3996dc8b8 (patch)
tree3686edd1b3ebb285e802a8a16b79552972c0b1b4 /src/industry_gui.cpp
parent4b42ecb0f64c0044786412c15fb31b3705016375 (diff)
downloadopenttd-bab7de6cf23dce124ef8b1e284d0d1f3996dc8b8.tar.xz
Feature: Allow GameScripts to add additional text to Industry view window
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index a89d4b4c5..58f4a6097 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -913,6 +913,13 @@ public:
}
}
}
+
+ if (!i->text.empty()) {
+ SetDParamStr(0, i->text.c_str());
+ y += WD_PAR_VSEP_WIDE;
+ y = DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK);
+ }
+
return y + WD_FRAMERECT_BOTTOM;
}