#307 fixes and cleanup

This commit is contained in:
Mikayla Fischler
2023-10-03 22:52:13 -04:00
parent b5e0183e54
commit ebabd99f2b
18 changed files with 65 additions and 100 deletions

View File

@ -118,11 +118,8 @@ local function app_button(args)
-- element redraw
function e.redraw()
-- write app title, centered
e.w_set_cur(math.floor((e.frame.w - string.len(args.title)) / 2) + 1, 4)
e.w_write(args.title)
-- draw button
draw()
end

View File

@ -188,11 +188,9 @@ local function radio_2d_button(args)
end
end
-- handle focus
-- handle focus & enable
e.on_focused = e.redraw
e.on_unfocused = e.redraw
-- handle enable
e.on_enabled = e.redraw
e.on_disabled = e.redraw

View File

@ -132,11 +132,9 @@ local function radio_button(args)
end
end
-- handle focus
-- handle focus & enable
e.on_focused = e.redraw
e.on_unfocused = e.redraw
-- handle enable
e.on_enabled = e.redraw
e.on_disabled = e.redraw