This commit is contained in:
@@ -22,8 +22,6 @@ local ALIGN = core.ALIGN
|
||||
|
||||
local cpair = core.cpair
|
||||
|
||||
local disabled_fg = style.fp.disabled_fg
|
||||
|
||||
local ind_grn = style.ind_grn
|
||||
|
||||
local UNIT_TYPE_LABELS = { "UNKNOWN", "REDSTONE", "BOILER", "TURBINE", "DYNAMIC TANK", "IND MATRIX", "SPS", "SNA", "ENV DETECTOR" }
|
||||
@@ -32,6 +30,8 @@ local UNIT_TYPE_LABELS = { "UNKNOWN", "REDSTONE", "BOILER", "TURBINE", "DYNAMIC
|
||||
---@param panel graphics_element main displaybox
|
||||
---@param units table unit list
|
||||
local function init(panel, units)
|
||||
local disabled_fg = style.fp.disabled_fg
|
||||
|
||||
TextBox{parent=panel,y=1,text="RTU GATEWAY",alignment=ALIGN.CENTER,height=1,fg_bg=style.theme.header}
|
||||
|
||||
--
|
||||
|
||||
@@ -10,9 +10,21 @@ local style = {}
|
||||
|
||||
local cpair = core.cpair
|
||||
|
||||
style.theme = themes.basalt
|
||||
style.theme = themes.sandstone
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
|
||||
style.ind_grn = cpair(colors.green, colors.green_off)
|
||||
|
||||
-- set theme per configuration
|
||||
---@param fp integer fp theme ID (1 = sandstone, 2 = basalt)
|
||||
function style.set_theme(fp)
|
||||
if fp == 1 then
|
||||
style.theme = themes.sandstone
|
||||
elseif fp == 2 then
|
||||
style.theme = themes.basalt
|
||||
end
|
||||
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
end
|
||||
|
||||
return style
|
||||
|
||||
Reference in New Issue
Block a user