SetTooltipFontSize
Set the font size 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 size roughly corresponds to the font’s height in pixels. Most glyphs will be smaller than this, depending on the font. It defaults to 20.
Function
void SetTooltipFontSize(equipment: string, sz: int)
Parameters
:
- equipment (string): the name of a piece of equipment with an attached tooltip to modify.
- sz (int): the size of font to use.
Example
Attaches a tooltip with a font of size 40 to what the user clicks/taps on. Nothing is rendered until your script returns, so no tooltip with a size 20 font will ever be seen by the user.
function onSelectionChangedCallback(name)
{
SYM3.AttachTooltip(name, `This is ${name}!`);
SYM3.SetTooltipFontSize(componentName, 40);
}
SYM3.SetOnEquipmentSelectionChanged(onSelectionChangedCallback);