Function: addTooltipComponent()
addTooltipComponent(
world,entity,options):TooltipEcsComponent
Defined in: ui/components/tooltip-component.ts:72
Attaches a TooltipEcsComponent to entity. entity also needs a
UiInteractableEcsComponent - createUiTooltipEcsSystem reads its
hover/focus state to decide when to show the tooltip.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options
TooltipRequiredOptions & Partial<TooltipDefaultedOptions>
Options for configuring the tooltip. panel/label
have no sensible default and must always be provided.
Returns
The attached component, for further tuning or runtime changes.