Codechange: use SetDParam and CopyOutDParam for tooltips

This commit is contained in:
Rubidium
2023-06-17 08:46:59 +02:00
committed by rubidium42
parent ac0c932ce7
commit 836541b41c
9 changed files with 28 additions and 38 deletions

View File

@@ -889,10 +889,9 @@ struct DepotWindow : Window {
}
/* Show tooltip window */
uint64 args[2];
args[0] = (whole_chain ? num : v->engine_type);
args[1] = (uint64)(size_t)details.c_str();
GuiShowTooltips(this, whole_chain ? STR_DEPOT_VEHICLE_TOOLTIP_CHAIN : STR_DEPOT_VEHICLE_TOOLTIP, 2, args, TCC_RIGHT_CLICK);
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);
return true;
}