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
| Field | Type | Description |
|---|---|---|
template | openmw.ui.Template? | Replaces the default OpenMW box template. |
content | table? | Child content; takes precedence over children. |
children | table? | Child layouts used when content is absent. |
Common layout fields are documented on the UI Components overview.