From e1ad76a00d032d7ba0c2ef0cb1ed43e08c20a716 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sun, 24 Mar 2024 13:56:19 -0400 Subject: [PATCH] #457 fixes and adjusted text --- coordinator/configure.lua | 18 +++++++++--------- reactor-plc/configure.lua | 18 +++++++++--------- rtu/configure.lua | 18 +++++++++--------- supervisor/configure.lua | 18 +++++++++--------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/coordinator/configure.lua b/coordinator/configure.lua index c85346a..6ddec1b 100644 --- a/coordinator/configure.lua +++ b/coordinator/configure.lua @@ -825,7 +825,7 @@ local function config_view(display) TextBox{parent=clr_c_1,x=18,y=7,height=1,text="Front Panel Theme"} local fp_theme = RadioButton{parent=clr_c_1,x=18,y=8,default=ini_cfg.FrontPanelTheme,options=themes.FP_THEME_NAMES,callback=function()end,radio_colors=cpair(colors.lightGray,colors.black),select_color=colors.magenta} - TextBox{parent=clr_c_2,x=1,y=1,height=6,text="By default, this project uses green/red heavily to distinguish ok and not, with some indicators also using multiple colors. By selecting a color mode below, indicators will change as shown and multi-color ones will be split up where possible."} + TextBox{parent=clr_c_2,x=1,y=1,height=6,text="This system uses color heavily to distinguish ok and not, with some indicators using many colors. By selecting a mode below, indicators will change as shown. For non-standard modes, indicators with more than two colors will be split up."} TextBox{parent=clr_c_2,x=21,y=7,height=1,text="Preview"} local _ = IndLight{parent=clr_c_2,x=21,y=8,label="Good",colors=cpair(colors.black,colors.green)} @@ -837,14 +837,6 @@ local function config_view(display) local function recolor(value) local c = themes.smooth_stone.color_modes[value] - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.STD_ON_BLACK then - for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end - else - term.setPaletteColor(colors.green, c[1].hex) - term.setPaletteColor(colors.yellow, c[2].hex) - term.setPaletteColor(colors.red, c[3].hex) - end - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.BLUE_IND then b_off.hide() g_off.show() @@ -852,6 +844,14 @@ local function config_view(display) g_off.hide() b_off.show() end + + if #c == 0 then + for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end + else + term.setPaletteColor(colors.green, c[1].hex) + term.setPaletteColor(colors.yellow, c[2].hex) + term.setPaletteColor(colors.red, c[3].hex) + end end TextBox{parent=clr_c_2,x=1,y=7,height=1,width=10,text="Color Mode"} diff --git a/reactor-plc/configure.lua b/reactor-plc/configure.lua index 9a8ece1..ac80b25 100644 --- a/reactor-plc/configure.lua +++ b/reactor-plc/configure.lua @@ -463,7 +463,7 @@ local function config_view(display) TextBox{parent=clr_c_1,x=1,y=7,height=1,text="Front Panel Theme"} local fp_theme = RadioButton{parent=clr_c_1,x=1,y=8,default=ini_cfg.FrontPanelTheme,options=themes.FP_THEME_NAMES,callback=function()end,radio_colors=cpair(colors.lightGray,colors.black),select_color=colors.magenta} - TextBox{parent=clr_c_2,x=1,y=1,height=6,text="By default, this project uses green/red heavily to distinguish ok and not, with some indicators also using multiple colors. By selecting a color mode below, indicators will change as shown and multi-color ones will be split up where possible."} + TextBox{parent=clr_c_2,x=1,y=1,height=6,text="This system uses color heavily to distinguish ok and not, with some indicators using many colors. By selecting a mode below, indicators will change as shown. For non-standard modes, indicators with more than two colors will be split up."} TextBox{parent=clr_c_2,x=21,y=7,height=1,text="Preview"} local _ = IndLight{parent=clr_c_2,x=21,y=8,label="Good",colors=cpair(colors.black,colors.green)} @@ -475,14 +475,6 @@ local function config_view(display) local function recolor(value) local c = themes.smooth_stone.color_modes[value] - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.STD_ON_BLACK then - for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end - else - term.setPaletteColor(colors.green, c[1].hex) - term.setPaletteColor(colors.yellow, c[2].hex) - term.setPaletteColor(colors.red, c[3].hex) - end - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.BLUE_IND then b_off.hide() g_off.show() @@ -490,6 +482,14 @@ local function config_view(display) g_off.hide() b_off.show() end + + if #c == 0 then + for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end + else + term.setPaletteColor(colors.green, c[1].hex) + term.setPaletteColor(colors.yellow, c[2].hex) + term.setPaletteColor(colors.red, c[3].hex) + end end TextBox{parent=clr_c_2,x=1,y=7,height=1,width=10,text="Color Mode"} diff --git a/rtu/configure.lua b/rtu/configure.lua index fe02d8e..38735c5 100644 --- a/rtu/configure.lua +++ b/rtu/configure.lua @@ -518,7 +518,7 @@ local function config_view(display) TextBox{parent=clr_c_1,x=1,y=7,height=1,text="Front Panel Theme"} local fp_theme = RadioButton{parent=clr_c_1,x=1,y=8,default=ini_cfg.FrontPanelTheme,options=themes.FP_THEME_NAMES,callback=function()end,radio_colors=cpair(colors.lightGray,colors.black),select_color=colors.magenta} - TextBox{parent=clr_c_2,x=1,y=1,height=6,text="By default, this project uses green/red heavily to distinguish ok and not, with some indicators also using multiple colors. By selecting a color mode below, indicators will change as shown and multi-color ones will be split up where possible."} + TextBox{parent=clr_c_2,x=1,y=1,height=6,text="This system uses color heavily to distinguish ok and not, with some indicators using many colors. By selecting a mode below, indicators will change as shown. For non-standard modes, indicators with more than two colors will be split up."} TextBox{parent=clr_c_2,x=21,y=7,height=1,text="Preview"} local _ = IndLight{parent=clr_c_2,x=21,y=8,label="Good",colors=cpair(colors.black,colors.green)} @@ -530,14 +530,6 @@ local function config_view(display) local function recolor(value) local c = themes.smooth_stone.color_modes[value] - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.STD_ON_BLACK then - for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end - else - term.setPaletteColor(colors.green, c[1].hex) - term.setPaletteColor(colors.yellow, c[2].hex) - term.setPaletteColor(colors.red, c[3].hex) - end - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.BLUE_IND then b_off.hide() g_off.show() @@ -545,6 +537,14 @@ local function config_view(display) g_off.hide() b_off.show() end + + if #c == 0 then + for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end + else + term.setPaletteColor(colors.green, c[1].hex) + term.setPaletteColor(colors.yellow, c[2].hex) + term.setPaletteColor(colors.red, c[3].hex) + end end TextBox{parent=clr_c_2,x=1,y=7,height=1,width=10,text="Color Mode"} diff --git a/supervisor/configure.lua b/supervisor/configure.lua index 86d4805..0b278d6 100644 --- a/supervisor/configure.lua +++ b/supervisor/configure.lua @@ -762,7 +762,7 @@ local function config_view(display) TextBox{parent=clr_c_1,x=1,y=7,height=1,text="Front Panel Theme"} local fp_theme = RadioButton{parent=clr_c_1,x=1,y=8,default=ini_cfg.FrontPanelTheme,options=themes.FP_THEME_NAMES,callback=function()end,radio_colors=cpair(colors.lightGray,colors.black),select_color=colors.magenta} - TextBox{parent=clr_c_2,x=1,y=1,height=6,text="By default, this project uses green/red heavily to distinguish ok and not, with some indicators also using multiple colors. By selecting a color mode below, indicators will change as shown and multi-color ones will be split up where possible."} + TextBox{parent=clr_c_2,x=1,y=1,height=6,text="This system uses color heavily to distinguish ok and not, with some indicators using many colors. By selecting a mode below, indicators will change as shown. For non-standard modes, indicators with more than two colors will be split up."} TextBox{parent=clr_c_2,x=21,y=7,height=1,text="Preview"} local _ = IndLight{parent=clr_c_2,x=21,y=8,label="Good",colors=cpair(colors.black,colors.green)} @@ -774,14 +774,6 @@ local function config_view(display) local function recolor(value) local c = themes.smooth_stone.color_modes[value] - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.STD_ON_BLACK then - for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end - else - term.setPaletteColor(colors.green, c[1].hex) - term.setPaletteColor(colors.yellow, c[2].hex) - term.setPaletteColor(colors.red, c[3].hex) - end - if value == themes.COLOR_MODE.STANDARD or value == themes.COLOR_MODE.BLUE_IND then b_off.hide() g_off.show() @@ -789,6 +781,14 @@ local function config_view(display) g_off.hide() b_off.show() end + + if #c == 0 then + for i = 1, #style.colors do term.setPaletteColor(style.colors[i].c, style.colors[i].hex) end + else + term.setPaletteColor(colors.green, c[1].hex) + term.setPaletteColor(colors.yellow, c[2].hex) + term.setPaletteColor(colors.red, c[3].hex) + end end TextBox{parent=clr_c_2,x=1,y=7,height=1,width=10,text="Color Mode"}