#91 get and set values for all controls/indicators and textbox

This commit is contained in:
Mikayla Fischler
2022-09-12 12:59:28 -04:00
parent d9be5ccb47
commit 10c53ac4b3
16 changed files with 192 additions and 60 deletions

View File

@@ -31,6 +31,7 @@ local function indicator_light(args)
-- on state change
---@param new_state boolean indicator state
function e.on_update(new_state)
e.value = new_state
e.window.setCursorPos(1, 1)
if new_state then
e.window.blit(" \x95", "0" .. args.colors.blit_a, args.colors.blit_a .. e.fg_bg.blit_bkg)
@@ -39,6 +40,8 @@ local function indicator_light(args)
end
end
function e.set_value(val) e.on_update(val) end
-- write label and initial indicator light
e.on_update(false)
e.window.write(args.label)