bugfixes and cleanup

This commit is contained in:
Mikayla 2024-03-11 16:35:06 +00:00
parent 5d760a0524
commit bbe7b52662
9 changed files with 28 additions and 26 deletions

View File

@ -366,8 +366,8 @@ local function config_view(display)
local function jump_color()
tool_ctl.jumped_to_color = true
tool_ctl.color_next.hide()
tool_ctl.color_apply.show(true)
tool_ctl.color_next.hide(true)
tool_ctl.color_apply.show()
main_pane.set_value(8)
end
@ -910,7 +910,7 @@ local function config_view(display)
tool_ctl.color_next = PushButton{parent=clr_c_1,x=44,y=14,text="Next \x1a",callback=submit_colors,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply = PushButton{parent=clr_c_1,x=43,y=14,min_width=7,text="Apply",callback=submit_colors,fg_bg=cpair(colors.black,colors.green),active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply.hide()
tool_ctl.color_apply.hide(true)
local function c_go_home()
main_pane.set_value(1)

View File

@ -93,6 +93,7 @@ function coordinator.load_config()
cfv.assert_type_int(config.LogMode)
cfv.assert_range(config.LogMode, 0, 1)
cfv.assert_type_str(config.LogPath)
cfv.assert_type_bool(config.LogDebug)
cfv.assert_type_int(config.MainTheme)
cfv.assert_range(config.MainTheme, 1, 2)

View File

@ -222,8 +222,8 @@ local function config_view(display)
local function jump_color()
tool_ctl.jumped_to_color = true
tool_ctl.color_next.hide()
tool_ctl.color_apply.show(true)
tool_ctl.color_next.hide(true)
tool_ctl.color_apply.show()
main_pane.set_value(5)
end
@ -545,7 +545,7 @@ local function config_view(display)
tool_ctl.color_next = PushButton{parent=clr_c_1,x=44,y=14,text="Next \x1a",callback=submit_colors,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply = PushButton{parent=clr_c_1,x=43,y=14,min_width=7,text="Apply",callback=submit_colors,fg_bg=cpair(colors.black,colors.green),active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply.hide()
tool_ctl.color_apply.hide(true)
local function c_go_home()
main_pane.set_value(1)
@ -639,6 +639,7 @@ local function config_view(display)
main_pane.set_value(1)
plc_pane.set_value(1)
net_pane.set_value(1)
clr_pane.set_value(1)
sum_pane.set_value(1)
end

View File

@ -328,8 +328,8 @@ local function config_view(display)
local function jump_color()
tool_ctl.jumped_to_color = true
tool_ctl.color_next.hide()
tool_ctl.color_apply.show(true)
tool_ctl.color_next.hide(true)
tool_ctl.color_apply.show()
main_pane.set_value(5)
end
@ -601,7 +601,7 @@ local function config_view(display)
tool_ctl.color_next = PushButton{parent=clr_c_1,x=44,y=14,text="Next \x1a",callback=submit_colors,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply = PushButton{parent=clr_c_1,x=43,y=14,min_width=7,text="Apply",callback=submit_colors,fg_bg=cpair(colors.black,colors.green),active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply.hide()
tool_ctl.color_apply.hide(true)
TextBox{parent=clr_c_3,x=1,y=1,height=1,text="Settings saved!"}
PushButton{parent=clr_c_3,x=1,y=14,min_width=6,text="Exit",callback=exit,fg_bg=cpair(colors.black,colors.red),active_fg_bg=cpair(colors.white,colors.gray)}

View File

@ -212,8 +212,8 @@ local function config_view(display)
local function jump_color()
tool_ctl.jumped_to_color = true
tool_ctl.color_next.hide()
tool_ctl.color_apply.show(true)
tool_ctl.color_next.hide(true)
tool_ctl.color_apply.show()
main_pane.set_value(5)
end
@ -844,7 +844,7 @@ local function config_view(display)
tool_ctl.color_next = PushButton{parent=clr_c_1,x=44,y=14,text="Next \x1a",callback=submit_colors,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply = PushButton{parent=clr_c_1,x=43,y=14,min_width=7,text="Apply",callback=submit_colors,fg_bg=cpair(colors.black,colors.green),active_fg_bg=btn_act_fg_bg}
tool_ctl.color_apply.hide()
tool_ctl.color_apply.hide(true)
local function c_go_home()
main_pane.set_value(1)

View File

@ -17,14 +17,14 @@ local ALIGN = core.ALIGN
local cpair = core.cpair
local label_fg = style.fp.label_fg
-- create a pocket diagnostics list entry
---@param parent graphics_element parent
---@param id integer PDG session ID
local function init(parent, id)
local s_hi_box = style.theme.highlight_box
local label_fg = style.fp.label_fg
-- root div
local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2,hidden=true}
local entry = Div{parent=root,x=2,y=1,height=3,fg_bg=style.theme.highlight_box_bright}

View File

@ -17,14 +17,14 @@ local ALIGN = core.ALIGN
local cpair = core.cpair
local label_fg = style.fp.label_fg
-- create an RTU list entry
---@param parent graphics_element parent
---@param id integer RTU session ID
local function init(parent, id)
local s_hi_box = style.theme.highlight_box
local label_fg = style.fp.label_fg
-- root div
local root = Div{parent=parent,x=2,y=2,height=4,width=parent.get_width()-2,hidden=true}
local entry = Div{parent=root,x=2,y=1,height=3,fg_bg=style.theme.highlight_box_bright}

View File

@ -10,7 +10,7 @@ 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)