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
+5
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user