#91 get and set values for all controls/indicators and textbox
This commit is contained in:
@@ -70,6 +70,8 @@ local function data(args)
|
||||
-- on state change
|
||||
---@param value any new value
|
||||
function e.on_update(value)
|
||||
e.value = value
|
||||
|
||||
local data_str = util.sprintf(args.format, value)
|
||||
|
||||
-- write data
|
||||
@@ -90,6 +92,8 @@ local function data(args)
|
||||
end
|
||||
end
|
||||
|
||||
function e.set_value(val) e.on_update(val) end
|
||||
|
||||
-- initial value draw
|
||||
e.on_update(args.value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user