FbTooltip
Members
-
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";
-
TrackActivate :boolean
-
Methods
-
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(); }
-
Deactivate()
-
-
GetDelayTime(type) → {number}
-
Parameters:
Name Type Description type
number Returns:
number -
SetDelayTime(type, time)
-
Parameters:
Name Type Description type
number See Flags.js > Used in FbTooltip#GetDelayTime and FbTooltip#SetDelayTime time
number -
SetFont(font_name, font_size_pxopt, font_styleopt)
-
Parameters:
Name Type Attributes Default Description font_name
string font_size_px
number <optional>
12 font_style
number <optional>
0 See Flags.js > FontStyle -
SetMaxWidth(width)
-
Use if you want multi-line tooltips.
Use \n as a new line separator.Parameters:
Name Type Description width
number Example
tooltip.SetMaxWidth(800); tooltip.Text = "Line1\nLine2";
-
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:
Name Type Description x
number y
number