class
FbTooltip
js/foo_uie_jsplitter.js:4033
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.
let tooltip = window.Tooltip;
tooltip.Text = "Whoop";
TrackActivate: boolean
Activate()
Note: only do this when text has changed, otherwise it will flicker.
let text = "...";
if (tooltip.Text != text) {
tooltip.Text = text;
tooltip.Activate();
}
Deactivate()
GetDelayTime(type)
| Name | Type | Description |
|---|---|---|
type | number |
numberSetDelayTime(type, time)
| Name | Type | Description |
|---|---|---|
type | number | See module:Flags > Used in GetDelayTime and SetDelayTime |
time | number |
SetFont(font_name, font_size_px, font_style)
| Name | Type | Description |
|---|---|---|
font_name | string | |
font_size_px = 12optional | number | |
font_style = 0optional | number | See FontStyle flags |
SetMaxWidth(width)
Use if you want multi-line tooltips.
Use \n as a new line separator.
| Name | Type | Description |
|---|---|---|
width | number |
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.
| Name | Type | Description |
|---|---|---|
x | number | |
y | number |