GetTooltipIndex
This function returns the last associated index of a tooltip associated with the given equipment.
Function
int GetTooltipIndex(equipmentName: string)
Parameters
- equipmentName (string): the name of the equipment with a tooltip to retrieve the index value for.
Return Value
Returns a negative value if the index could not be retrieved, or a positive integer smaller than 100 otherwise.
Example
Gets the index of the selected tooltip, and add one to it, and reattach a new tooltip with that index.
SYM3.SetOnTooltipSelectedCallback(tooltipSelected);
function tooltipSelected(equipmentName)
{
let index = SYM3.GetTooltipIndex(equipmentName);
SYM3.AttachTooltip(equipmentName, equipmentName, index + 1);
}