Skip to content
S3ctor’s S3cret St4sh
api

tooltip

Build boxed explanatory content without positioning it.

Builds an H3UI nine-slice box with a two-pixel content inset and a paragraph-text child by default. It is content, not a tooltip manager.

Example

local ui = require 'openmw.ui'
local util = require 'openmw.util'
local H3UI = require('openmw.interfaces').H3UI

ui.create {
  type = ui.TYPE.Container,
  layer = 'Windows',
  content = ui.content {
    H3UI.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

text · window