cc-mek-scada/rtu/panel/style.lua

31 lines
626 B
Lua
Raw Normal View History

2023-04-21 00:40:28 +00:00
--
-- Graphics Style Options
--
2024-03-06 17:18:50 +00:00
local core = require("graphics.core")
local themes = require("graphics.themes")
2023-04-21 00:40:28 +00:00
2024-03-06 17:18:50 +00:00
---@class rtu_style
2023-04-21 00:40:28 +00:00
local style = {}
2023-05-07 01:27:36 +00:00
local cpair = core.cpair
2023-04-21 00:40:28 +00:00
style.theme = themes.sandstone
2024-03-06 17:18:50 +00:00
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
2023-04-21 00:40:28 +00:00
return style