#77 alarm sounder

This commit is contained in:
Mikayla Fischler
2022-12-04 13:59:10 -05:00
parent 518ee8272a
commit 4030fdc5c9
9 changed files with 575 additions and 25 deletions

View File

@@ -36,7 +36,7 @@ local function switch_button(args)
-- button state (convert nil to false if missing)
e.value = args.default or false
local h_pad = math.floor((e.frame.w - text_width) / 2)
local h_pad = math.floor((e.frame.w - text_width) / 2) + 1
local v_pad = math.floor(e.frame.h / 2) + 1
-- show the button state
@@ -51,6 +51,9 @@ local function switch_button(args)
e.window.setBackgroundColor(e.fg_bg.bkg)
end
-- clear to redraw background
e.window.clear()
-- write the button text
e.window.setCursorPos(h_pad, v_pad)
e.window.write(args.text)