H3lp Yours3lfDocs
api

textInput

Build a plain OpenMW TextEdit line.

Builds a ui.TYPE.TextEdit, using OpenMW's I.MWUI.templates.textEditLine by default.

Example

local async = require 'openmw.async'
local ui = require 'openmw.ui'
local textInput = require 'scripts.s3.components.textInput'

ui.create {
  type = ui.TYPE.Container,
  layer = 'Windows',
  content = ui.content {
    textInput {
      text = 'Nerevarine',
      events = {
        textChanged = async:callback(function(value)
          print('Name:', value)
          return true
        end),
      },
    },
  },
}

Parameters

FieldTypeDescription
textstring?Initial editor text.
templateopenmw.ui.Template?Replaces the default OpenMW text-edit template.

Common layout fields are documented on the UI Components overview. Events are passed through unchanged; wrap OpenMW callbacks with async:callback.

See also

numberInput · searchInput · text