Builds a plain ui.TYPE.TextEdit with H3UI text appearance and a 150-pixel default width. onChange runs for each edit; onCommit runs when editing focus is released. Raw events remain available for lower-level TextEdit behavior.
Example
local H3UI = require('openmw.interfaces').H3UI
local nameInput = H3UI.textInput {
text = 'Nerevarine',
onChange = function(value)
characterName = value
end,
}Parameters
| Field | Type | Description |
|---|---|---|
text | string? | Initial editor text. |
onChange | function? | Receives the current editor text after it changes. |
onCommit | function? | Receives the final editor text when the TextEdit loses focus. |
template | openmw.ui.Template? | Replaces the default OpenMW text-edit template. |
Common layout fields are documented on the UI Components overview.