mirror of https://github.com/OpenTTD/OpenTTD
(svn r12965) -Codechange: add support for callback 37 in industries directory window
parent
e7678a03cc
commit
963dce0d47
|
@ -64,6 +64,7 @@ assert_compile(lengthof(_fund_gui.index) == lengthof(_fund_gui.enabled));
|
||||||
enum CargoSuffixType {
|
enum CargoSuffixType {
|
||||||
CST_FUND,
|
CST_FUND,
|
||||||
CST_VIEW,
|
CST_VIEW,
|
||||||
|
CST_DIR,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -806,6 +807,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
|
||||||
|
|
||||||
while (pos < _num_industry_sort) {
|
while (pos < _num_industry_sort) {
|
||||||
const Industry* i = _industry_sort[pos];
|
const Industry* i = _industry_sort[pos];
|
||||||
|
const IndustrySpec *indsp = GetIndustrySpec(i->type);
|
||||||
byte p = 0;
|
byte p = 0;
|
||||||
|
|
||||||
/* Industry name */
|
/* Industry name */
|
||||||
|
@ -816,6 +818,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
|
||||||
if (i->produced_cargo[j] == CT_INVALID) continue;
|
if (i->produced_cargo[j] == CT_INVALID) continue;
|
||||||
SetDParam(p++, i->produced_cargo[j]);
|
SetDParam(p++, i->produced_cargo[j]);
|
||||||
SetDParam(p++, i->last_month_production[j]);
|
SetDParam(p++, i->last_month_production[j]);
|
||||||
|
SetDParam(p++, GetCargoSuffix(j + 3, CST_DIR, (Industry*)i, i->type, indsp));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transported productions */
|
/* Transported productions */
|
||||||
|
@ -826,7 +829,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
|
||||||
|
|
||||||
/* Drawing the right string */
|
/* Drawing the right string */
|
||||||
StringID str = STR_INDUSTRYDIR_ITEM_NOPROD;
|
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);
|
DrawString(4, 28 + n * 10, str, TC_FROMSTRING);
|
||||||
|
|
||||||
pos++;
|
pos++;
|
||||||
|
|
|
@ -1330,8 +1330,8 @@ STR_CONSTRUCT_TOFFEE_QUARRY_TIP :{BLACK}Fund Tof
|
||||||
STR_CONSTRUCT_SUGAR_MINE_TIP :{BLACK}Construct Sugar Mine
|
STR_CONSTRUCT_SUGAR_MINE_TIP :{BLACK}Construct Sugar Mine
|
||||||
|
|
||||||
STR_INDUSTRYDIR_CAPTION :{WHITE}Industries
|
STR_INDUSTRYDIR_CAPTION :{WHITE}Industries
|
||||||
STR_INDUSTRYDIR_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}){YELLOW} ({COMMA}% transported)
|
STR_INDUSTRYDIR_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}{STRING}){YELLOW} ({COMMA}% transported)
|
||||||
STR_INDUSTRYDIR_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}/{CARGO}){YELLOW} ({COMMA}%/{COMMA}% transported)
|
STR_INDUSTRYDIR_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}{STRING}/{CARGO}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transported)
|
||||||
STR_INDUSTRYDIR_ITEM_NOPROD :{ORANGE}{INDUSTRY}
|
STR_INDUSTRYDIR_ITEM_NOPROD :{ORANGE}{INDUSTRY}
|
||||||
|
|
||||||
STR_INDUSTRY_TOO_CLOSE :{WHITE}...too close to another industry
|
STR_INDUSTRY_TOO_CLOSE :{WHITE}...too close to another industry
|
||||||
|
|
Loading…
Reference in New Issue