SetTooltipBorderColor
Set the 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 border is the edge of the rightmost portion of the tooltip. It defaults to purple.
Function
void SetTooltipBorderColor(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 border 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(componentName, `This is ${name}!`);
SYM3.SetTooltipBorderColor(name, 0, 0, 255, 255);
}
SYM3.SetOnEquipmentSelectionChanged(onSelectionChangedCallback);