#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

@@ -40,6 +40,7 @@ local function tristate_indicator_light(args)
-- on state change
---@param new_state integer indicator state
function e.on_update(new_state)
e.value = new_state
e.window.setCursorPos(1, 1)
if new_state == 2 then
e.window.blit(" \x95", "0" .. c2, c2 .. e.fg_bg.blit_bkg)
@@ -50,6 +51,8 @@ local function tristate_indicator_light(args)
end
end
function e.set_value(val) e.on_update(val) end
-- write label and initial indicator light
e.on_update(0)
e.window.write(args.label)