Documentation/FbTooltip
class

FbTooltip

jsdoc/objects/ui.js:1
property

Text

jsdoc/objects/ui.js:6
Text: string

Note: this also updates text on the active tooltip i.e. there is no need to manually cycle Deactivate()/Activate() to update text.

Example

let tooltip = window.Tooltip;
tooltip.Text = "Whoop";
property

TrackActivate

jsdoc/objects/ui.js:19
TrackActivate: boolean
method

Activate

jsdoc/objects/ui.js:22
Activate()

Note: only do this when text has changed, otherwise it will flicker.

Example

let text = "...";
if (tooltip.Text != text) {
   tooltip.Text = text;
   tooltip.Activate();
}
method

Deactivate

jsdoc/objects/ui.js:36
Deactivate()
method

GetDelayTime

jsdoc/objects/ui.js:39
GetDelayTime(type)

Parameters

NameTypeDescription
typenumber

Returns

number
method

SetDelayTime

jsdoc/objects/ui.js:45
SetDelayTime(type, time)

Parameters

NameTypeDescription
typenumber

See module:Flags > Used in GetDelayTime and SetDelayTime

timenumber
method

SetFont

jsdoc/objects/ui.js:51
SetFont(font_name, font_size_px, font_style)

Parameters

NameTypeDescription
font_namestring
font_size_px = 12optionalnumber
font_style = 0optionalnumber

See FontStyle flags

method

SetMaxWidth

jsdoc/objects/ui.js:58
SetMaxWidth(width)

Use if you want multi-line tooltips.
Use \n as a new line separator.

Parameters

NameTypeDescription
widthnumber

Example

tooltip.SetMaxWidth(800);
tooltip.Text = "Line1\nLine2";
method

TrackPosition

jsdoc/objects/ui.js:70
TrackPosition(x, y)

Note: check that x, y positions have changed from the last invocation, otherwise it will flicker.
Note 2: ensure that the tooltip does not overlap the mouse pointer, otherwise it will glitch out.

Parameters

NameTypeDescription
xnumber
ynumber