uiconfig.js API
    Preparing search index...

    Type Alias UiTooltipHook

    UiTooltipHook: (
        element: HTMLElement,
        text: string,
        info: UiTooltipInfo,
    ) => void | (() => void)

    Draws the tooltip of an element of a renderer: an icon-only button (its label), a button with a key, the ⋮ button of a folder header. Renderers call it with the text, and call the function that it returns to remove the tooltip, before they call it again with a new text (the label or the key changed) and when the element goes.

    Set it for every renderer with UiConfigRendererBase.Tooltip, for the renderers of one class (for example UiConfigRendererTweakpane.Tooltip), or for one renderer with its tooltip property (false: none). The default is titleTooltip, the native title. The accessible name of an element stays its aria-label.

    Type Declaration

      • (element: HTMLElement, text: string, info: UiTooltipInfo): void | (() => void)
      • Parameters

        • element: HTMLElement

          the element

        • text: string

          the label, and the key in parentheses when there is one: Snapshot (⌘S)

        • info: UiTooltipInfo

          the label and the key apart, and whether the tooltip is needed now

        Returns void | (() => void)

        a function that removes the tooltip, if it needs one