lvgl.build
Build a complex UI in a single operation.
Last updated
Was this helpful?
Was this helpful?
lvgl.build({
{type="label", x=0, y=0, text="Some text", color=BLACK},
{type="rectangle", x=0, y=20, w=100, h=100, color=BLACK}
})lvgl.build({
{type="label", x=0, y=0, text="Some text", color=BLACK},
{type="rectangle", x=0, y=20, w=100, h=100, color=BLACK,
children={
{type="label", x=5, y=5, text="More text", color=BLACK}
}
}
})local uiElements = lvgl.build({
{type="label", x=0, y=0, text="Some text", color=BLACK},
{type="rectangle", x=0, y=20, w=100, h=100, color=BLACK,
children={
{type="label", x=5, y=5, text="More text", color=BLACK, name="lbl1"}
}
}
})
uiElements["lbl1"]:set({color=BLUE})