H3lp Yours3lfDocs
api

box

Put content in the shared H3UI box treatment.

Builds an H3UI box around optional content. The default template is OpenMW's I.MWUI.templates.box; pass template to use another supported template.

Example

local ui = require 'openmw.ui'
local box = require 'scripts.s3.components.box'
local text = require 'scripts.s3.components.text'

ui.create {
  type = ui.TYPE.Container,
  layer = 'Windows',
  content = ui.content {
    box {
      children = {
        text {
          text = 'A reusable framed box',
        },
      },
    },
  },
}

Parameters

FieldTypeDescription
templateopenmw.ui.Template?Replaces the default OpenMW box template.
contenttable?Child content; takes precedence over children.
childrentable?Child layouts used when content is absent.

Common layout fields are documented on the UI Components overview.

See also

bookFrame · dialog · tooltip