Codechange: Store EncodedString for tooltip text.

This replaces capturing and storing string parameters.
This commit is contained in:
Peter Nelson
2024-12-07 01:41:31 +00:00
committed by Peter Nelson
parent 1f21e9dc74
commit 2cb9f55183
12 changed files with 67 additions and 77 deletions
+5 -3
View File
@@ -899,9 +899,11 @@ struct DepotWindow : Window {
}
/* Show tooltip window */
SetDParam(0, whole_chain ? num : v->engine_type);
SetDParamStr(1, details);
GuiShowTooltips(this, whole_chain ? STR_DEPOT_VEHICLE_TOOLTIP_CHAIN : STR_DEPOT_VEHICLE_TOOLTIP, TCC_RIGHT_CLICK, 2);
if (whole_chain) {
GuiShowTooltips(this, GetEncodedString(STR_DEPOT_VEHICLE_TOOLTIP_CHAIN, num, details), TCC_RIGHT_CLICK);
} else {
GuiShowTooltips(this, GetEncodedString(STR_DEPOT_VEHICLE_TOOLTIP, v->engine_type, details), TCC_RIGHT_CLICK);
}
return true;
}