SetTooltipPrefixBorderColor
Set the prefix border 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 prefix is the leftmost portion of the tooltip that looks a little like a speech bubble. If an index number is given to AttachTooltip, it is where that number will be displayed. The border of this prefix is the small edge of the ‘speech bubble’. It defaults to purple.
Function
void SetTooltipPrefixBorderColor(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 green prefix background to what the user clicks/taps on. Nothing is rendered until your script returns, so no tooltip with a purple border will ever be seen by the user.
function onSelectionChangedCallback(name)
{
SYM3.AttachTooltip(name, `This is ${name}!`);
SYM3.SetTooltipPrefixBorderColor(name, 0, 255, 0, 255);
}
SYM3.SetOnEquipmentSelectionChanged(onSelectionChangedCallback);