color reactor coolant bars based on coolant type

This commit is contained in:
Mikayla Fischler
2022-12-11 10:51:45 -05:00
parent a633f5b4c3
commit a591cab338
6 changed files with 49 additions and 12 deletions

View File

@@ -363,6 +363,12 @@ function element.new(args)
protected.disable()
end
-- custom recolor command, varies by element if implemented
---@vararg cpair|color color(s)
function public.recolor(...)
protected.recolor(...)
end
-- resize attributes of the element value if supported
---@vararg number dimensions (element specific)
function public.resize(...)

View File

@@ -106,7 +106,9 @@ local function hbar(args)
-- re-draw
last_num_bars = 0
e.on_update(e.value)
if type(e.value) == "number" then
e.on_update(e.value)
end
end
-- set the percentage value

View File

@@ -89,7 +89,9 @@ local function vbar(args)
-- re-draw
last_num_bars = 0
e.on_update(e.value)
if type(e.value) == "number" then
e.on_update(e.value)
end
end
-- set the percentage value