SetOnTooltipSelectedCallback
Subscribe to this event to be notified when the user selects a tooltip. The equipment can be selected by a quick mouse click (on PC/Mac) or a tap (on touch screen).
Function
void SetOnTooltipSelectedCallback(name: function)
Parameters
- function (function(string)): Called with the name of the equipment that owns the tooltip that was clicked or touched.
Example
Randomise the color of a tooltip that has been touched.
SYM3.SetOnTooltipSelectedCallback(tooltipSelected);
function tooltipSelected(equipmentName)
{
let r = Math.floor(Math.random() * Math.floor(255));
let g = Math.floor(Math.random() * Math.floor(255));
let b = Math.floor(Math.random() * Math.floor(255));
let a = 255;
SYM3.SetTooltipPrefixBorderColor(equipmentName, r, g, b, a);
SYM3.SetTooltipBorderColor(equipmentName, r, g, b, a);
}