H3lp Yours3lfDocs
api

listItem

Build a padded row for one list entry.

Builds a padded H3UI row. Without content or children, it creates one normal-text child from label.

Example

local ui = require 'openmw.ui'
local listItem = require 'scripts.s3.components.listItem'

ui.create {
  type = ui.TYPE.Container,
  layer = 'Windows',
  content = ui.content {
    listItem {
      name = 'selected_item',
      label = 'A padded entry',
    },
  },
}

Parameters

FieldTypeDescription
labelstring?Text for the generated label.
labelPropstable?Properties for the generated label.
contenttable?Custom child content; replaces the generated label.
childrentable?Custom child layouts when content is absent.
templateopenmw.ui.Template?Replaces the default row template.

Common layout fields are documented on the UI Components overview.

See also

list · button · text