AttachTooltip

Attach a tooltip to a given piece of equipment, with a given label. Any given piece of equipment can have one label attached to it at a time. Calling this function a second time will replace the previous label. Call RemoveTooltip to remove the tooltip.

Function

void AttachTooltip(equipment: string, text: string, index: int)

Parameters

  • equipment (string): the equipment name to attach a tooltip to.
  • text (string): the text string to display on the tooltip.
  • index (number): an optional index number to display on the left of the tooltip, between 0-99 (inclusive).

Examples

Attaches a tooltip with no index number to everything the user touches/taps on.

function onComponentSelectionChangedCallback(componentName)
{
    SYM3.AttachTooltip(componentName, `This is ${componentName}!`);
}
SYM3.SetOnEquipmentSelectionChanged(onComponentSelectionChangedCallback);

Attaches a tooltip with the index number 35 to everything the user touches/taps on.

function onComponentSelectionChangedCallback(componentName)
{
    SYM3.AttachTooltip(componentName, `This is ${componentName}!`, 35);
}
SYM3.SetOnEquipmentSelectionChanged(onComponentSelectionChangedCallback);