SetTooltipFontColor

Set the font color for a tooltip that has been attached. If called on a piece of equipment that has not had AttachTooltip called for it, this function will do nothing.

The font color defaults to black.

Function

void SetTooltipFontColor(equipment: string, r: int, g: int, b: int, a: int)

Parameters

  • equipment (string): the name of a piece of equipment with an attached tooltip to modify.
  • r (int): the red component of the color. Ranges from 0 to 255 (inclusive).
  • g (int): the green component of the color. Ranges from 0 to 255 (inclusive).
  • b (int): the blue component of the color. Ranges from 0 to 255 (inclusive).
  • a (int): the alpha component of the color. Ranges from 0 (totally transparent) to 255 (completely opaque, inclusive).

Example

Attaches a tooltip with a blue font to what the user clicks/taps on. Nothing is rendered until your script returns, so no tooltip with a black font will ever be seen by the user.

function onSelectionChangedCallback(name)
{
    SYM3.AttachTooltip(name, `This is ${name}!`);
    SYM3.SetTooltipFontColor(name, 0, 0, 255, 255);
}
SYM3.SetOnEquipmentSelectionChanged(onSelectionChangedCallback);