mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-26 13:44:16 +01:00
Codechange: Store EncodedString for tooltip text.
This replaces capturing and storing string parameters.
This commit is contained in:
committed by
Peter Nelson
parent
1f21e9dc74
commit
2cb9f55183
@@ -3181,7 +3181,7 @@ struct IndustryCargoesWindow : public Window {
|
||||
|
||||
case CFT_INDUSTRY:
|
||||
if (fld->u.industry.ind_type < NUM_INDUSTRYTYPES && (this->ind_cargo >= NUM_INDUSTRYTYPES || fieldxy.x != 2)) {
|
||||
GuiShowTooltips(this, STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP, close_cond);
|
||||
GuiShowTooltips(this, GetEncodedString(STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP), close_cond);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -3190,8 +3190,7 @@ struct IndustryCargoesWindow : public Window {
|
||||
}
|
||||
if (IsValidCargoType(cargo_type) && (this->ind_cargo < NUM_INDUSTRYTYPES || cargo_type != this->ind_cargo - NUM_INDUSTRYTYPES)) {
|
||||
const CargoSpec *csp = CargoSpec::Get(cargo_type);
|
||||
SetDParam(0, csp->name);
|
||||
GuiShowTooltips(this, STR_INDUSTRY_CARGOES_CARGO_TOOLTIP, close_cond, 1);
|
||||
GuiShowTooltips(this, GetEncodedString(STR_INDUSTRY_CARGOES_CARGO_TOOLTIP, csp->name), close_cond);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user