mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#307 fixes and cleanup
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user