summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-05-05 22:42:06 +0000
committerglx <glx@openttd.org>2008-05-05 22:42:06 +0000
commit7da190c1e0265517c18c23c60bf5a4c9a1ee10a1 (patch)
tree5f3a204a83807d5ba50bcc307cbdac085960d6ab /src/industry_gui.cpp
parent7f8f70f6f013ffd04592507ef8d042e680b26814 (diff)
downloadopenttd-7da190c1e0265517c18c23c60bf5a4c9a1ee10a1.tar.xz
(svn r12965) -Codechange: add support for callback 37 in industries directory window
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 799d95f36..3fd63712f 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -64,6 +64,7 @@ assert_compile(lengthof(_fund_gui.index) == lengthof(_fund_gui.enabled));
enum CargoSuffixType {
CST_FUND,
CST_VIEW,
+ CST_DIR,
};
/**
@@ -806,6 +807,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
while (pos < _num_industry_sort) {
const Industry* i = _industry_sort[pos];
+ const IndustrySpec *indsp = GetIndustrySpec(i->type);
byte p = 0;
/* Industry name */
@@ -816,6 +818,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
if (i->produced_cargo[j] == CT_INVALID) continue;
SetDParam(p++, i->produced_cargo[j]);
SetDParam(p++, i->last_month_production[j]);
+ SetDParam(p++, GetCargoSuffix(j + 3, CST_DIR, (Industry*)i, i->type, indsp));
}
/* Transported productions */
@@ -826,7 +829,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
/* Drawing the right string */
StringID str = STR_INDUSTRYDIR_ITEM_NOPROD;
- if (p != 1) str = (p == 4) ? STR_INDUSTRYDIR_ITEM : STR_INDUSTRYDIR_ITEM_TWO;
+ if (p != 1) str = (p == 5) ? STR_INDUSTRYDIR_ITEM : STR_INDUSTRYDIR_ITEM_TWO;
DrawString(4, 28 + n * 10, str, TC_FROMSTRING);
pos++;