Skip to content

GlassesLayout:clearAndDisplayExtended

since 26.1.0

Clear layout and display text at position x, y with optional extra commands.

layout:clearAndDisplayExtended(params)

Parameters

Name Type Required Description
params table yes see the fields below

Fields of params:

  • x (integer): left
  • y (integer): top
  • text (text): text
  • commands(table): table of extra commands (font, text, bitmap)

Returns

Nothing.

Examples

From the official Ethos documentation
local function wakeup(context)
  context.layout:clearAndDisplayExtended({
     x=10,
     y=10,
     text="ARMED!",
     commands={
         {text={text="Extra1", font=2, x=10, y=10}},
         {text={text="Extra2", font=2, x=50, y=10}},
         {bitmap={id=10, x=10, y=40}}
     }})
end