Skip to main content

Interface: CreateTooltipDefaultedOptions

Defined in: ui/utilities/create-tooltip.ts:39

Fields of CreateTooltipOptions with a sensible default; callers may omit these.

Properties​

category?​

optional category?: number

Defined in: ui/utilities/create-tooltip.ts:65

The render category the tooltip's label text draws with, forwarded to createLabel's category option - the panel's own category comes from sprite.renderable.category instead, unaffected by this. Pass the same value you gave the tooltip's canvas's cullingMask (see CreateUiCanvasDefaultedOptions.cullingMask) so the label is actually visible through it. Omitted, the label falls back to TextEcsComponent's own default (TEXT_RENDER_CATEGORY).


offset​

offset: Vector2

Defined in: ui/utilities/create-tooltip.ts:48

Gap between the source element's top edge and the tooltip's bottom edge, in reference pixels. Defaults to { x: 0, y: 8 } - a small vertical gap, horizontally centered over the source.


showDelayMilliseconds​

showDelayMilliseconds: number

Defined in: ui/utilities/create-tooltip.ts:51

How long, in milliseconds, the source must stay hovered/focused before the tooltip appears. Defaults to 400.


size​

size: Vector2

Defined in: ui/utilities/create-tooltip.ts:41

The tooltip panel's size, in reference pixels. Defaults to { x: 160, y: 40 }.


textColor​

textColor: Color

Defined in: ui/utilities/create-tooltip.ts:54

The text's tint. Defaults to Color.white.