Fix tooltip string parameters, change function signatures to match upstream

This commit is contained in:
Jonathan G Rennison
2023-11-17 17:26:57 +00:00
parent 9ceef09e9c
commit c76dc937e3
20 changed files with 96 additions and 110 deletions

View File

@@ -3171,7 +3171,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, 0, nullptr, close_cond);
GuiShowTooltips(this, STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP, close_cond);
}
return true;
@@ -3180,9 +3180,8 @@ struct IndustryCargoesWindow : public Window {
}
if (cid != INVALID_CARGO && (this->ind_cargo < NUM_INDUSTRYTYPES || cid != this->ind_cargo - NUM_INDUSTRYTYPES)) {
const CargoSpec *csp = CargoSpec::Get(cid);
uint64 params[5];
params[0] = csp->name;
GuiShowTooltips(this, STR_INDUSTRY_CARGOES_CARGO_TOOLTIP, 1, params, close_cond);
SetDParam(0, csp->name);
GuiShowTooltips(this, STR_INDUSTRY_CARGOES_CARGO_TOOLTIP, close_cond, 1);
return true;
}
@@ -3351,6 +3350,6 @@ void ShowIndustryTooltip(Window *w, const TileIndex tile)
if (!msg.empty()) {
_temp_special_strings[0] = std::move(msg);
GuiShowTooltips(w, SPECSTR_TEMP_START, 0, nullptr, TCC_HOVER_VIEWPORT);
GuiShowTooltips(w, SPECSTR_TEMP_START, TCC_HOVER_VIEWPORT);
}
}