[Horus] Widget::update added to the Lua interface (called when options are modified)

This commit is contained in:
Bertrand Songis
2016-05-21 11:08:01 +02:00
parent 0fad67a8ea
commit 7a2c0b3b88
2 changed files with 33 additions and 2 deletions
+5 -1
View File
@@ -10,9 +10,13 @@ local function create(zone, options)
return pie
end
local function update(pie, options)
pie.options = options
end
function refresh(pie)
pie.counter = pie.counter + 1
lcd.drawNumber(pie.zone.x, pie.zone.y, pie.counter, LEFT + DBLSIZE + TEXT_COLOR);
end
return { name="Counter", options=options, create=create, refresh=refresh }
return { name="Counter", options=options, create=create, update=update, refresh=refresh }