Skip to content
S3ctor’s S3cret St4sh
api

textInput

Build a plain H3UI text-edit line with a semantic change callback.

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

FieldTypeDescription
textstring?Initial editor text.
onChangefunction?Receives the current editor text after it changes.
onCommitfunction?Receives the final editor text when the TextEdit loses focus.
templateopenmw.ui.Template?Replaces the default OpenMW text-edit template.

Common layout fields are documented on the UI Components overview.

See also

numberInput · searchInput · text