H3lp Yours3lfDocs
api

tooltip

Build boxed explanatory content without positioning it.

Builds a transparent H3UI box with padding and a paragraph-text child by default. It is content, not a tooltip manager.

Example

local ui = require 'openmw.ui'
local tooltip = require 'scripts.s3.components.tooltip'
local util = require 'openmw.util'

ui.create {
  type = ui.TYPE.Container,
  layer = 'Windows',
  content = ui.content {
    tooltip {
      text = 'This explains the item under the pointer.',
      props = {
        position = util.vector2(100, 100),
      },
    },
  },
}

Parameters

FieldTypeDescription
textstring?Text for the generated paragraph.
textPropstable?Properties for the generated paragraph.
templateopenmw.ui.Template?Replaces the default transparent box template.
contenttable?Custom child content; replaces generated text.
childrentable?Custom child layouts used when content is absent.

Common layout fields are documented on the UI Components overview.

See also

dialog · text · window