Skip to content

lvgl.build

lvgl.build([parent, ]params)

Build a complex UI in a single operation from a table of object definitions.

Parameters

NameReqTypeDescription
parentnoobjectoptional LVGL object to attach the built objects to; if omitted they attach to the top-level script window
paramsyestablea table of tables, each defining one LVGL object:
FieldTypeDescription
typestring or type constantmandatory, selects the kind of object to create, e.g. "rectangle" or lvgl.RECTANGLE; named type constants (e.g. lvgl.RECTANGLE) added in 2.11.4, string names work in all versions
namestringoptional name used to look up this object in the returned table, defaults to an empty string
childrentableoptional nested table of the same shape, to create child objects
  • any other key accepted by the constructor function for the chosen type

Returns

Name Type Description
- table named LVGL objects (only entries whose definition included a name are included)

Availability

  • Since: 2.11.0
  • Radio support: color-lcd

Notes

  • Objects can be nested via children, another table of tables using the same shape as the top-level params. @notice Very large or deeply nested tables may fail to compile to .luac -- if a script works from .lua but fails from .luac, split the call into multiple smaller lvgl.build() calls.

Source

radio/src/lua/api_colorlcd_lvgl.cpp