Builds a ui.TYPE.Text layout and supplies props.text. Without a template, H3 applies Morrowind's normal text color and size.
Example
local ui = require 'openmw.ui'
local H3UI = require('openmw.interfaces').H3UI
ui.create {
type = ui.TYPE.Container,
layer = 'Windows',
content = ui.content {
H3UI.text {
text = 'Hello from H3',
props = {
textAlignH = ui.ALIGNMENT.Center,
},
},
},
}Parameters
| Field | Type | Description |
|---|---|---|
text | string? | Initial text; copied to props.text. |
template | openmw.ui.Template? | Replaces the default text template. |
Common layout fields are documented on the UI Components overview.
See also
textInput · caption · listItem
String shorthand
text 'Settings' is equivalent to text { text = 'Settings' }.