mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#91 recoloring of horizontal and vertical bar indicators
This commit is contained in:
parent
cd6bb7376d
commit
1bf21564f9
@ -98,6 +98,7 @@ local function hbar(args)
|
||||
end
|
||||
end
|
||||
|
||||
-- change bar color
|
||||
---@param bar_fg_bg cpair new bar colors
|
||||
function e.recolor(bar_fg_bg)
|
||||
bar_bkg = bar_fg_bg.blit_bkg
|
||||
|
@ -80,6 +80,17 @@ local function vbar(args)
|
||||
end
|
||||
end
|
||||
|
||||
-- change bar color
|
||||
---@param fg_bg cpair new bar colors
|
||||
function e.recolor(fg_bg)
|
||||
fgd = util.strrep(fg_bg.blit_fgd, e.frame.w)
|
||||
bkg = util.strrep(fg_bg.blit_bkg, e.frame.w)
|
||||
|
||||
-- re-draw
|
||||
last_num_bars = 0
|
||||
e.on_update(e.value)
|
||||
end
|
||||
|
||||
function e.set_value(val) e.on_update(val) end
|
||||
|
||||
return e.get()
|
||||
|
Loading…
Reference in New Issue
Block a user