2023-02-28 04:59:46 +00:00
|
|
|
--
|
|
|
|
-- Graphics Style Options
|
|
|
|
--
|
2022-06-14 16:02:42 +00:00
|
|
|
|
|
|
|
local core = require("graphics.core")
|
|
|
|
|
|
|
|
local style = {}
|
|
|
|
|
2023-05-07 01:27:36 +00:00
|
|
|
local cpair = core.cpair
|
2022-06-16 15:24:35 +00:00
|
|
|
|
2022-07-05 16:46:31 +00:00
|
|
|
-- GLOBAL --
|
2022-06-14 16:02:42 +00:00
|
|
|
|
2023-07-10 03:31:56 +00:00
|
|
|
-- add color mappings for front panel
|
|
|
|
colors.ivory = colors.pink
|
2023-07-12 17:38:37 +00:00
|
|
|
colors.yellow_hc = colors.purple
|
2023-07-10 03:31:56 +00:00
|
|
|
colors.red_off = colors.brown
|
|
|
|
colors.yellow_off = colors.magenta
|
|
|
|
colors.green_off = colors.lime
|
|
|
|
|
|
|
|
-- front panel styling
|
|
|
|
|
|
|
|
style.fp = {}
|
|
|
|
|
|
|
|
style.fp.root = cpair(colors.black, colors.ivory)
|
|
|
|
style.fp.header = cpair(colors.black, colors.lightGray)
|
|
|
|
|
|
|
|
style.fp.colors = {
|
|
|
|
{ c = colors.red, hex = 0xdf4949 }, -- RED ON
|
|
|
|
{ c = colors.orange, hex = 0xffb659 },
|
|
|
|
{ c = colors.yellow, hex = 0xf9fb53 }, -- YELLOW ON
|
|
|
|
{ c = colors.lime, hex = 0x16665a }, -- GREEN OFF
|
|
|
|
{ c = colors.green, hex = 0x6be551 }, -- GREEN ON
|
|
|
|
{ c = colors.cyan, hex = 0x34bac8 },
|
|
|
|
{ c = colors.lightBlue, hex = 0x6cc0f2 },
|
|
|
|
{ c = colors.blue, hex = 0x0096ff },
|
2023-07-12 17:38:37 +00:00
|
|
|
{ c = colors.purple, hex = 0xb156ee }, -- YELLOW HIGH CONTRAST
|
2023-07-10 03:31:56 +00:00
|
|
|
{ c = colors.pink, hex = 0xdcd9ca }, -- IVORY
|
|
|
|
{ c = colors.magenta, hex = 0x85862c }, -- YELLOW OFF
|
|
|
|
-- { c = colors.white, hex = 0xdcd9ca },
|
|
|
|
{ c = colors.lightGray, hex = 0xb1b8b3 },
|
|
|
|
{ c = colors.gray, hex = 0x575757 },
|
|
|
|
-- { c = colors.black, hex = 0x191919 },
|
|
|
|
{ c = colors.brown, hex = 0x672223 } -- RED OFF
|
|
|
|
}
|
|
|
|
|
|
|
|
-- main GUI styling
|
|
|
|
|
2022-06-16 15:24:35 +00:00
|
|
|
style.root = cpair(colors.black, colors.lightGray)
|
|
|
|
style.header = cpair(colors.white, colors.gray)
|
2022-08-09 04:40:50 +00:00
|
|
|
style.label = cpair(colors.gray, colors.lightGray)
|
2022-06-16 15:24:35 +00:00
|
|
|
|
2022-07-05 16:46:31 +00:00
|
|
|
style.colors = {
|
2022-07-09 17:43:38 +00:00
|
|
|
{ c = colors.red, hex = 0xdf4949 },
|
|
|
|
{ c = colors.orange, hex = 0xffb659 },
|
|
|
|
{ c = colors.yellow, hex = 0xfffc79 },
|
2022-11-22 02:32:45 +00:00
|
|
|
{ c = colors.lime, hex = 0x80ff80 },
|
2022-07-09 17:43:38 +00:00
|
|
|
{ c = colors.green, hex = 0x4aee8a },
|
|
|
|
{ c = colors.cyan, hex = 0x34bac8 },
|
|
|
|
{ c = colors.lightBlue, hex = 0x6cc0f2 },
|
|
|
|
{ c = colors.blue, hex = 0x0096ff },
|
|
|
|
{ c = colors.purple, hex = 0xb156ee },
|
|
|
|
{ c = colors.pink, hex = 0xf26ba2 },
|
|
|
|
{ c = colors.magenta, hex = 0xf9488a },
|
|
|
|
-- { c = colors.white, hex = 0xf0f0f0 },
|
|
|
|
{ c = colors.lightGray, hex = 0xcacaca },
|
|
|
|
{ c = colors.gray, hex = 0x575757 },
|
|
|
|
-- { c = colors.black, hex = 0x191919 },
|
|
|
|
-- { c = colors.brown, hex = 0x7f664c }
|
2022-07-05 16:46:31 +00:00
|
|
|
}
|
|
|
|
|
2023-08-13 04:51:37 +00:00
|
|
|
-- COMMON COLOR PAIRS --
|
|
|
|
|
2023-08-20 20:52:12 +00:00
|
|
|
style.wh_gray = cpair(colors.white, colors.gray)
|
|
|
|
|
2023-08-13 04:51:37 +00:00
|
|
|
style.bw_fg_bg = cpair(colors.black, colors.white)
|
|
|
|
style.text_colors = cpair(colors.black, colors.lightGray)
|
|
|
|
style.lu_colors = cpair(colors.gray, colors.gray)
|
2023-08-20 20:52:12 +00:00
|
|
|
style.hzd_fg_bg = style.wh_gray
|
2023-08-13 04:51:37 +00:00
|
|
|
style.dis_colors = cpair(colors.white, colors.lightGray)
|
|
|
|
|
|
|
|
style.ind_grn = cpair(colors.green, colors.gray)
|
|
|
|
style.ind_yel = cpair(colors.yellow, colors.gray)
|
|
|
|
style.ind_red = cpair(colors.red, colors.gray)
|
2023-08-20 20:52:12 +00:00
|
|
|
style.ind_wht = style.wh_gray
|
2023-08-13 04:51:37 +00:00
|
|
|
|
|
|
|
-- UI COMPONENTS --
|
2022-07-05 16:46:31 +00:00
|
|
|
|
2022-06-16 15:24:35 +00:00
|
|
|
style.reactor = {
|
|
|
|
-- reactor states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
2022-09-13 20:08:11 +00:00
|
|
|
text = "PLC OFF-LINE"
|
2022-06-16 15:24:35 +00:00
|
|
|
},
|
2022-12-10 18:58:17 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "NOT FORMED"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "PLC FAULT"
|
|
|
|
},
|
2022-06-16 15:24:35 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.white, colors.gray),
|
|
|
|
text = "DISABLED"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "ACTIVE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.red),
|
2022-09-13 20:08:11 +00:00
|
|
|
text = "SCRAMMED"
|
2022-09-03 17:10:51 +00:00
|
|
|
},
|
2022-11-11 20:45:46 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.red),
|
|
|
|
text = "FORCE DISABLED"
|
2022-06-16 15:24:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-14 16:02:42 +00:00
|
|
|
|
2022-06-25 20:21:57 +00:00
|
|
|
style.boiler = {
|
|
|
|
-- boiler states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "OFF-LINE"
|
|
|
|
},
|
2022-11-11 19:59:53 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
2023-02-13 23:53:24 +00:00
|
|
|
text = "NOT FORMED"
|
2022-11-11 19:59:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
2023-02-13 23:53:24 +00:00
|
|
|
text = "RTU FAULT"
|
2022-12-10 18:58:17 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.white, colors.gray),
|
|
|
|
text = "IDLE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "ACTIVE"
|
2022-06-25 20:21:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-02 21:24:52 +00:00
|
|
|
style.turbine = {
|
|
|
|
-- turbine states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "OFF-LINE"
|
|
|
|
},
|
2022-12-10 18:58:17 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "NOT FORMED"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "RTU FAULT"
|
|
|
|
},
|
2022-07-02 21:24:52 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.white, colors.gray),
|
|
|
|
text = "IDLE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "ACTIVE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.red),
|
|
|
|
text = "TRIP"
|
2022-12-10 18:58:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
style.imatrix = {
|
|
|
|
-- induction matrix states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "OFF-LINE"
|
2022-11-11 19:59:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
2022-12-10 18:58:17 +00:00
|
|
|
text = "NOT FORMED"
|
2022-11-11 19:59:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
2022-12-10 18:58:17 +00:00
|
|
|
text = "RTU FAULT"
|
|
|
|
},
|
|
|
|
{
|
2022-12-10 20:44:11 +00:00
|
|
|
color = cpair(colors.black, colors.green),
|
2022-12-10 18:58:17 +00:00
|
|
|
text = "ONLINE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "LOW CHARGE"
|
|
|
|
},
|
|
|
|
{
|
2023-03-05 16:52:03 +00:00
|
|
|
color = cpair(colors.black, colors.yellow),
|
2022-12-10 18:58:17 +00:00
|
|
|
text = "HIGH CHARGE"
|
2023-07-06 05:36:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-08 20:57:13 +00:00
|
|
|
style.sps = {
|
|
|
|
-- SPS states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "OFF-LINE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "NOT FORMED"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "RTU FAULT"
|
|
|
|
},
|
|
|
|
{
|
2023-08-20 00:06:37 +00:00
|
|
|
color = cpair(colors.white, colors.gray),
|
2023-07-08 20:57:13 +00:00
|
|
|
text = "IDLE"
|
|
|
|
},
|
|
|
|
{
|
2023-08-20 00:06:37 +00:00
|
|
|
color = cpair(colors.black, colors.green),
|
2023-07-08 20:57:13 +00:00
|
|
|
text = "ACTIVE"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-13 04:11:58 +00:00
|
|
|
style.dtank = {
|
|
|
|
-- dynamic tank states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "OFF-LINE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "NOT FORMED"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.orange),
|
|
|
|
text = "RTU FAULT"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "ONLINE"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.yellow),
|
|
|
|
text = "LOW FILL"
|
2023-08-20 00:06:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "FILLED"
|
|
|
|
},
|
2023-08-13 04:11:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-06 05:36:06 +00:00
|
|
|
style.waste = {
|
|
|
|
-- auto waste processing states
|
|
|
|
states = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "PLUTONIUM"
|
2022-12-10 18:58:17 +00:00
|
|
|
},
|
2023-07-06 05:36:06 +00:00
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.cyan),
|
|
|
|
text = "POLONIUM"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.purple),
|
|
|
|
text = "ANTI MATTER"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
states_abbrv = {
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.green),
|
|
|
|
text = "Pu"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.cyan),
|
|
|
|
text = "Po"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
color = cpair(colors.black, colors.purple),
|
|
|
|
text = "AM"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
-- process radio button options
|
|
|
|
options = { "Plutonium", "Polonium", "Antimatter" },
|
|
|
|
-- unit waste selection
|
|
|
|
unit_opts = {
|
|
|
|
{
|
|
|
|
text = "Auto",
|
|
|
|
fg_bg = cpair(colors.black, colors.lightGray),
|
|
|
|
active_fg_bg = cpair(colors.white, colors.gray)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text = "Pu",
|
|
|
|
fg_bg = cpair(colors.black, colors.lightGray),
|
|
|
|
active_fg_bg = cpair(colors.black, colors.green)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text = "Po",
|
|
|
|
fg_bg = cpair(colors.black, colors.lightGray),
|
|
|
|
active_fg_bg = cpair(colors.black, colors.cyan)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
text = "AM",
|
|
|
|
fg_bg = cpair(colors.black, colors.lightGray),
|
|
|
|
active_fg_bg = cpair(colors.black, colors.purple)
|
|
|
|
}
|
2022-07-02 21:24:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-14 16:02:42 +00:00
|
|
|
return style
|