consistent checkbox capitalization
This commit is contained in:
parent
a4a59d4a3d
commit
bc2ae291a7
@ -19,7 +19,7 @@ local ListBox = require("graphics.elements.ListBox")
|
|||||||
local MultiPane = require("graphics.elements.MultiPane")
|
local MultiPane = require("graphics.elements.MultiPane")
|
||||||
local TextBox = require("graphics.elements.TextBox")
|
local TextBox = require("graphics.elements.TextBox")
|
||||||
|
|
||||||
local CheckBox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local PushButton = require("graphics.elements.controls.PushButton")
|
local PushButton = require("graphics.elements.controls.PushButton")
|
||||||
local RadioButton = require("graphics.elements.controls.RadioButton")
|
local RadioButton = require("graphics.elements.controls.RadioButton")
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ local function config_view(display)
|
|||||||
|
|
||||||
local function censor_key(enable) key.censor(util.trinary(enable, "*", nil)) end
|
local function censor_key(enable) key.censor(util.trinary(enable, "*", nil)) end
|
||||||
|
|
||||||
local hide_key = CheckBox{parent=net_c_4,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
local hide_key = Checkbox{parent=net_c_4,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
||||||
|
|
||||||
hide_key.set_value(true)
|
hide_key.set_value(true)
|
||||||
censor_key(true)
|
censor_key(true)
|
||||||
@ -706,7 +706,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=mon_c_4,x=1,y=1,height=3,text="For legacy compatibility with facilities built without space for a flow monitor, you can disable the flow monitor requirement here."}
|
TextBox{parent=mon_c_4,x=1,y=1,height=3,text="For legacy compatibility with facilities built without space for a flow monitor, you can disable the flow monitor requirement here."}
|
||||||
TextBox{parent=mon_c_4,x=1,y=5,height=3,text="Please be aware that THIS OPTION WILL BE REMOVED ON RELEASE. Disabling it will only be available for the remainder of the beta."}
|
TextBox{parent=mon_c_4,x=1,y=5,height=3,text="Please be aware that THIS OPTION WILL BE REMOVED ON RELEASE. Disabling it will only be available for the remainder of the beta."}
|
||||||
|
|
||||||
local dis_flow_view = CheckBox{parent=mon_c_4,x=1,y=9,default=ini_cfg.DisableFlowView,label="Disable Flow View Monitor",box_fg_bg=cpair(colors.blue,colors.black)}
|
local dis_flow_view = Checkbox{parent=mon_c_4,x=1,y=9,default=ini_cfg.DisableFlowView,label="Disable Flow View Monitor",box_fg_bg=cpair(colors.blue,colors.black)}
|
||||||
|
|
||||||
local function back_from_legacy()
|
local function back_from_legacy()
|
||||||
tmp_cfg.DisableFlowView = dis_flow_view.get_value()
|
tmp_cfg.DisableFlowView = dis_flow_view.get_value()
|
||||||
@ -790,7 +790,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
||||||
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
||||||
|
|
||||||
local en_dbg = CheckBox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
local en_dbg = Checkbox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
||||||
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ local RadIndicator = require("graphics.elements.indicators.RadIndicator")
|
|||||||
local StateIndicator = require("graphics.elements.indicators.StateIndicator")
|
local StateIndicator = require("graphics.elements.indicators.StateIndicator")
|
||||||
local TriIndicatorLight = require("graphics.elements.indicators.TriIndicatorLight")
|
local TriIndicatorLight = require("graphics.elements.indicators.TriIndicatorLight")
|
||||||
|
|
||||||
local Checkbox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local HazardButton = require("graphics.elements.controls.HazardButton")
|
local HazardButton = require("graphics.elements.controls.HazardButton")
|
||||||
local NumericSpinbox = require("graphics.elements.controls.NumericSpinbox")
|
local NumericSpinbox = require("graphics.elements.controls.NumericSpinbox")
|
||||||
local RadioButton = require("graphics.elements.controls.RadioButton")
|
local RadioButton = require("graphics.elements.controls.RadioButton")
|
||||||
|
|||||||
@ -17,7 +17,7 @@ local element = require("graphics.element")
|
|||||||
|
|
||||||
-- Create a new checkbox control element.
|
-- Create a new checkbox control element.
|
||||||
---@param args checkbox_args
|
---@param args checkbox_args
|
||||||
---@return CheckBox element, element_id id
|
---@return Checkbox element, element_id id
|
||||||
return function (args)
|
return function (args)
|
||||||
element.assert(type(args.label) == "string", "label is a required field")
|
element.assert(type(args.label) == "string", "label is a required field")
|
||||||
element.assert(type(args.box_fg_bg) == "table", "box_fg_bg is a required field")
|
element.assert(type(args.box_fg_bg) == "table", "box_fg_bg is a required field")
|
||||||
@ -112,8 +112,8 @@ return function (args)
|
|||||||
draw_label()
|
draw_label()
|
||||||
end
|
end
|
||||||
|
|
||||||
---@class CheckBox:graphics_element
|
---@class Checkbox:graphics_element
|
||||||
local CheckBox, id = e.complete(true)
|
local Checkbox, id = e.complete(true)
|
||||||
|
|
||||||
return CheckBox, id
|
return Checkbox, id
|
||||||
end
|
end
|
||||||
@ -15,7 +15,7 @@ local ListBox = require("graphics.elements.ListBox")
|
|||||||
local MultiPane = require("graphics.elements.MultiPane")
|
local MultiPane = require("graphics.elements.MultiPane")
|
||||||
local TextBox = require("graphics.elements.TextBox")
|
local TextBox = require("graphics.elements.TextBox")
|
||||||
|
|
||||||
local CheckBox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local PushButton = require("graphics.elements.controls.PushButton")
|
local PushButton = require("graphics.elements.controls.PushButton")
|
||||||
local RadioButton = require("graphics.elements.controls.RadioButton")
|
local RadioButton = require("graphics.elements.controls.RadioButton")
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ local function config_view(display)
|
|||||||
-- declare back first so tabbing makes sense visually
|
-- declare back first so tabbing makes sense visually
|
||||||
PushButton{parent=net_c_4,x=1,y=15,text="\x1b Back",callback=function()net_pane.set_value(3)end,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
|
PushButton{parent=net_c_4,x=1,y=15,text="\x1b Back",callback=function()net_pane.set_value(3)end,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
|
||||||
|
|
||||||
local hide_key = CheckBox{parent=net_c_4,x=8,y=15,label="Hide Key",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
local hide_key = Checkbox{parent=net_c_4,x=8,y=15,label="Hide Key",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
||||||
|
|
||||||
hide_key.set_value(true)
|
hide_key.set_value(true)
|
||||||
censor_key(true)
|
censor_key(true)
|
||||||
@ -323,7 +323,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
||||||
local path = TextField{parent=log_c_1,x=1,y=8,width=24,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
local path = TextField{parent=log_c_1,x=1,y=8,width=24,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
||||||
|
|
||||||
local en_dbg = CheckBox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
local en_dbg = Checkbox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
||||||
TextBox{parent=log_c_1,x=3,y=11,height=4,text="This results in much larger log files. Use only as needed.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=log_c_1,x=3,y=11,height=4,text="This results in much larger log files. Use only as needed.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local path_err = TextBox{parent=log_c_1,x=1,y=14,width=24,text="Provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
local path_err = TextBox{parent=log_c_1,x=1,y=14,width=24,text="Provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ function iocontrol.init_core(pkt_comms, nav, cfg)
|
|||||||
|
|
||||||
ready_warn = nil, ---@type TextBox
|
ready_warn = nil, ---@type TextBox
|
||||||
tone_buttons = {}, ---@type SwitchButton[]
|
tone_buttons = {}, ---@type SwitchButton[]
|
||||||
alarm_buttons = {}, ---@type CheckBox[]
|
alarm_buttons = {}, ---@type Checkbox[]
|
||||||
tone_indicators = {} ---@type IndicatorLight[] indicators to update from supervisor tone states
|
tone_indicators = {} ---@type IndicatorLight[] indicators to update from supervisor tone states
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ local TextBox = require("graphics.elements.TextBox")
|
|||||||
|
|
||||||
local IndicatorLight = require("graphics.elements.indicators.IndicatorLight")
|
local IndicatorLight = require("graphics.elements.indicators.IndicatorLight")
|
||||||
|
|
||||||
local Checkbox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local PushButton = require("graphics.elements.controls.PushButton")
|
local PushButton = require("graphics.elements.controls.PushButton")
|
||||||
local SwitchButton = require("graphics.elements.controls.SwitchButton")
|
local SwitchButton = require("graphics.elements.controls.SwitchButton")
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ local ListBox = require("graphics.elements.ListBox")
|
|||||||
local MultiPane = require("graphics.elements.MultiPane")
|
local MultiPane = require("graphics.elements.MultiPane")
|
||||||
local TextBox = require("graphics.elements.TextBox")
|
local TextBox = require("graphics.elements.TextBox")
|
||||||
|
|
||||||
local CheckBox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local PushButton = require("graphics.elements.controls.PushButton")
|
local PushButton = require("graphics.elements.controls.PushButton")
|
||||||
local Radio2D = require("graphics.elements.controls.Radio2D")
|
local Radio2D = require("graphics.elements.controls.Radio2D")
|
||||||
local RadioButton = require("graphics.elements.controls.RadioButton")
|
local RadioButton = require("graphics.elements.controls.RadioButton")
|
||||||
@ -90,7 +90,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
|
|||||||
TextBox{parent=plc_c_1,x=1,y=1,text="Would you like to set this PLC as networked?"}
|
TextBox{parent=plc_c_1,x=1,y=1,text="Would you like to set this PLC as networked?"}
|
||||||
TextBox{parent=plc_c_1,x=1,y=3,height=4,text="If you have a supervisor, select the box. You will later be prompted to select the network configuration. If you instead want to use this as a standalone safety system, don't select the box.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=plc_c_1,x=1,y=3,height=4,text="If you have a supervisor, select the box. You will later be prompted to select the network configuration. If you instead want to use this as a standalone safety system, don't select the box.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local networked = CheckBox{parent=plc_c_1,x=1,y=8,label="Networked",default=ini_cfg.Networked,box_fg_bg=cpair(colors.orange,colors.black)}
|
local networked = Checkbox{parent=plc_c_1,x=1,y=8,label="Networked",default=ini_cfg.Networked,box_fg_bg=cpair(colors.orange,colors.black)}
|
||||||
|
|
||||||
local function submit_networked()
|
local function submit_networked()
|
||||||
self.set_networked(networked.get_value())
|
self.set_networked(networked.get_value())
|
||||||
@ -128,7 +128,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
|
|||||||
TextBox{parent=plc_c_3,x=1,y=1,height=4,text="When networked, the supervisor takes care of emergency coolant via RTUs. However, you can configure independent emergency coolant via the PLC."}
|
TextBox{parent=plc_c_3,x=1,y=1,height=4,text="When networked, the supervisor takes care of emergency coolant via RTUs. However, you can configure independent emergency coolant via the PLC."}
|
||||||
TextBox{parent=plc_c_3,x=1,y=6,height=5,text="This independent control can be used with or without a supervisor. To configure, you would next select the interface of the redstone output connected to one or more mekanism pipes.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=plc_c_3,x=1,y=6,height=5,text="This independent control can be used with or without a supervisor. To configure, you would next select the interface of the redstone output connected to one or more mekanism pipes.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local en_em_cool = CheckBox{parent=plc_c_3,x=1,y=11,label="Enable PLC Emergency Coolant Control",default=ini_cfg.EmerCoolEnable,box_fg_bg=cpair(colors.orange,colors.black)}
|
local en_em_cool = Checkbox{parent=plc_c_3,x=1,y=11,label="Enable PLC Emergency Coolant Control",default=ini_cfg.EmerCoolEnable,box_fg_bg=cpair(colors.orange,colors.black)}
|
||||||
|
|
||||||
local function next_from_plc()
|
local function next_from_plc()
|
||||||
if tmp_cfg.Networked then main_pane.set_value(3) else main_pane.set_value(4) end
|
if tmp_cfg.Networked then main_pane.set_value(3) else main_pane.set_value(4) end
|
||||||
@ -146,7 +146,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
|
|||||||
local side = Radio2D{parent=plc_c_4,x=1,y=2,rows=2,columns=3,default=side_to_idx(ini_cfg.EmerCoolSide),options=side_options,radio_colors=cpair(colors.lightGray,colors.black),select_color=colors.orange}
|
local side = Radio2D{parent=plc_c_4,x=1,y=2,rows=2,columns=3,default=side_to_idx(ini_cfg.EmerCoolSide),options=side_options,radio_colors=cpair(colors.lightGray,colors.black),select_color=colors.orange}
|
||||||
|
|
||||||
TextBox{parent=plc_c_4,x=1,y=5,text="Bundled Redstone Configuration"}
|
TextBox{parent=plc_c_4,x=1,y=5,text="Bundled Redstone Configuration"}
|
||||||
local bundled = CheckBox{parent=plc_c_4,x=1,y=6,label="Is Bundled?",default=ini_cfg.EmerCoolColor~=nil,box_fg_bg=cpair(colors.orange,colors.black),callback=function(v)self.bundled_emcool(v)end}
|
local bundled = Checkbox{parent=plc_c_4,x=1,y=6,label="Is Bundled?",default=ini_cfg.EmerCoolColor~=nil,box_fg_bg=cpair(colors.orange,colors.black),callback=function(v)self.bundled_emcool(v)end}
|
||||||
local color = Radio2D{parent=plc_c_4,x=1,y=8,rows=4,columns=4,default=color_to_idx(ini_cfg.EmerCoolColor),options=color_options,radio_colors=cpair(colors.lightGray,colors.black),color_map=color_options_map,disable_color=colors.gray,disable_fg_bg=g_lg_fg_bg}
|
local color = Radio2D{parent=plc_c_4,x=1,y=8,rows=4,columns=4,default=color_to_idx(ini_cfg.EmerCoolColor),options=color_options,radio_colors=cpair(colors.lightGray,colors.black),color_map=color_options_map,disable_color=colors.gray,disable_fg_bg=g_lg_fg_bg}
|
||||||
if ini_cfg.EmerCoolColor == nil then color.disable() end
|
if ini_cfg.EmerCoolColor == nil then color.disable() end
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
|
|||||||
|
|
||||||
local function censor_key(enable) key.censor(util.trinary(enable, "*", nil)) end
|
local function censor_key(enable) key.censor(util.trinary(enable, "*", nil)) end
|
||||||
|
|
||||||
local hide_key = CheckBox{parent=net_c_3,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
local hide_key = Checkbox{parent=net_c_3,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
||||||
|
|
||||||
hide_key.set_value(true)
|
hide_key.set_value(true)
|
||||||
censor_key(true)
|
censor_key(true)
|
||||||
@ -279,7 +279,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
|
|||||||
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
||||||
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
||||||
|
|
||||||
local en_dbg = CheckBox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
local en_dbg = Checkbox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
||||||
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ local ListBox = require("graphics.elements.ListBox")
|
|||||||
local MultiPane = require("graphics.elements.MultiPane")
|
local MultiPane = require("graphics.elements.MultiPane")
|
||||||
local TextBox = require("graphics.elements.TextBox")
|
local TextBox = require("graphics.elements.TextBox")
|
||||||
|
|
||||||
local CheckBox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local PushButton = require("graphics.elements.controls.PushButton")
|
local PushButton = require("graphics.elements.controls.PushButton")
|
||||||
local Radio2D = require("graphics.elements.controls.Radio2D")
|
local Radio2D = require("graphics.elements.controls.Radio2D")
|
||||||
local RadioButton = require("graphics.elements.controls.RadioButton")
|
local RadioButton = require("graphics.elements.controls.RadioButton")
|
||||||
@ -450,7 +450,7 @@ local function config_view(display)
|
|||||||
|
|
||||||
local function censor_key(enable) key.censor(tri(enable, "*", nil)) end
|
local function censor_key(enable) key.censor(tri(enable, "*", nil)) end
|
||||||
|
|
||||||
local hide_key = CheckBox{parent=net_c_3,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
local hide_key = Checkbox{parent=net_c_3,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
||||||
|
|
||||||
hide_key.set_value(true)
|
hide_key.set_value(true)
|
||||||
censor_key(true)
|
censor_key(true)
|
||||||
@ -485,7 +485,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
||||||
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
||||||
|
|
||||||
local en_dbg = CheckBox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
local en_dbg = Checkbox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
||||||
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
||||||
@ -1198,7 +1198,7 @@ local function config_view(display)
|
|||||||
tool_ctl.rs_cfg_shortcut = TextBox{parent=rs_c_3,x=1,y=9,height=4,text="This shortcut will add entries for each of the 4 waste outputs. If you select bundled, 4 colors will be assigned to the selected side. Otherwise, 4 default sides will be used."}
|
tool_ctl.rs_cfg_shortcut = TextBox{parent=rs_c_3,x=1,y=9,height=4,text="This shortcut will add entries for each of the 4 waste outputs. If you select bundled, 4 colors will be assigned to the selected side. Otherwise, 4 default sides will be used."}
|
||||||
tool_ctl.rs_cfg_shortcut.hide(true)
|
tool_ctl.rs_cfg_shortcut.hide(true)
|
||||||
|
|
||||||
local bundled = CheckBox{parent=rs_c_3,x=1,y=7,label="Is Bundled?",default=false,box_fg_bg=cpair(colors.red,colors.black),callback=set_bundled}
|
local bundled = Checkbox{parent=rs_c_3,x=1,y=7,label="Is Bundled?",default=false,box_fg_bg=cpair(colors.red,colors.black),callback=set_bundled}
|
||||||
tool_ctl.rs_cfg_color = Radio2D{parent=rs_c_3,x=1,y=9,rows=4,columns=4,default=1,options=color_options,radio_colors=cpair(colors.lightGray,colors.black),color_map=color_options_map,disable_color=colors.gray,disable_fg_bg=g_lg_fg_bg}
|
tool_ctl.rs_cfg_color = Radio2D{parent=rs_c_3,x=1,y=9,rows=4,columns=4,default=1,options=color_options,radio_colors=cpair(colors.lightGray,colors.black),color_map=color_options_map,disable_color=colors.gray,disable_fg_bg=g_lg_fg_bg}
|
||||||
tool_ctl.rs_cfg_color.disable()
|
tool_ctl.rs_cfg_color.disable()
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ local ListBox = require("graphics.elements.ListBox")
|
|||||||
local MultiPane = require("graphics.elements.MultiPane")
|
local MultiPane = require("graphics.elements.MultiPane")
|
||||||
local TextBox = require("graphics.elements.TextBox")
|
local TextBox = require("graphics.elements.TextBox")
|
||||||
|
|
||||||
local CheckBox = require("graphics.elements.controls.CheckBox")
|
local Checkbox = require("graphics.elements.controls.Checkbox")
|
||||||
local PushButton = require("graphics.elements.controls.PushButton")
|
local PushButton = require("graphics.elements.controls.PushButton")
|
||||||
local Radio2D = require("graphics.elements.controls.Radio2D")
|
local Radio2D = require("graphics.elements.controls.Radio2D")
|
||||||
local RadioButton = require("graphics.elements.controls.RadioButton")
|
local RadioButton = require("graphics.elements.controls.RadioButton")
|
||||||
@ -77,7 +77,7 @@ local tool_ctl = {
|
|||||||
auth_key_textbox = nil, ---@type TextBox
|
auth_key_textbox = nil, ---@type TextBox
|
||||||
auth_key_value = "",
|
auth_key_value = "",
|
||||||
|
|
||||||
cooling_elems = {}, ---@type { line: Div, turbines: NumberField, boilers: NumberField, tank: CheckBox }[]
|
cooling_elems = {}, ---@type { line: Div, turbines: NumberField, boilers: NumberField, tank: Checkbox }[]
|
||||||
tank_elems = {}, ---@type { div: Div, tank_opt: Radio2D, no_tank: TextBox }[]
|
tank_elems = {}, ---@type { div: Div, tank_opt: Radio2D, no_tank: TextBox }[]
|
||||||
|
|
||||||
vis_ftanks = {}, ---@type { line: Div, pipe_conn?: TextBox, pipe_chain?: TextBox, pipe_direct?: TextBox, label?: TextBox }[]
|
vis_ftanks = {}, ---@type { line: Div, pipe_conn?: TextBox, pipe_chain?: TextBox, pipe_direct?: TextBox, label?: TextBox }[]
|
||||||
@ -271,7 +271,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=line,text="Unit "..i,width=6}
|
TextBox{parent=line,text="Unit "..i,width=6}
|
||||||
local turbines = NumberField{parent=line,x=9,y=1,width=5,max_chars=2,default=num_t,min=1,max=3,fg_bg=bw_fg_bg}
|
local turbines = NumberField{parent=line,x=9,y=1,width=5,max_chars=2,default=num_t,min=1,max=3,fg_bg=bw_fg_bg}
|
||||||
local boilers = NumberField{parent=line,x=20,y=1,width=5,max_chars=2,default=num_b,min=0,max=2,fg_bg=bw_fg_bg}
|
local boilers = NumberField{parent=line,x=20,y=1,width=5,max_chars=2,default=num_b,min=0,max=2,fg_bg=bw_fg_bg}
|
||||||
local tank = CheckBox{parent=line,x=30,y=1,label="Is Connected",default=has_t,box_fg_bg=cpair(colors.yellow,colors.black)}
|
local tank = Checkbox{parent=line,x=30,y=1,label="Is Connected",default=has_t,box_fg_bg=cpair(colors.yellow,colors.black)}
|
||||||
|
|
||||||
tool_ctl.cooling_elems[i] = { line = line, turbines = turbines, boilers = boilers, tank = tank }
|
tool_ctl.cooling_elems[i] = { line = line, turbines = turbines, boilers = boilers, tank = tank }
|
||||||
end
|
end
|
||||||
@ -328,7 +328,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=svr_c_3,x=1,y=1,height=6,text="You have set one or more of your units to use dynamic tanks for emergency coolant. You have two paths for configuration. The first is to assign dynamic tanks to reactor units; one tank per reactor, only connected to that reactor. RTU configurations must also assign it as such."}
|
TextBox{parent=svr_c_3,x=1,y=1,height=6,text="You have set one or more of your units to use dynamic tanks for emergency coolant. You have two paths for configuration. The first is to assign dynamic tanks to reactor units; one tank per reactor, only connected to that reactor. RTU configurations must also assign it as such."}
|
||||||
TextBox{parent=svr_c_3,x=1,y=8,height=3,text="Alternatively, you can configure them as facility tanks to connect to multiple reactor units. These can intermingle with unit-specific tanks."}
|
TextBox{parent=svr_c_3,x=1,y=8,height=3,text="Alternatively, you can configure them as facility tanks to connect to multiple reactor units. These can intermingle with unit-specific tanks."}
|
||||||
|
|
||||||
local en_fac_tanks = CheckBox{parent=svr_c_3,x=1,y=12,label="Use Facility Dynamic Tanks",default=ini_cfg.FacilityTankMode>0,box_fg_bg=cpair(colors.yellow,colors.black)}
|
local en_fac_tanks = Checkbox{parent=svr_c_3,x=1,y=12,label="Use Facility Dynamic Tanks",default=ini_cfg.FacilityTankMode>0,box_fg_bg=cpair(colors.yellow,colors.black)}
|
||||||
|
|
||||||
local function submit_en_fac_tank()
|
local function submit_en_fac_tank()
|
||||||
if en_fac_tanks.get_value() then
|
if en_fac_tanks.get_value() then
|
||||||
@ -589,7 +589,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=svr_c_7,height=6,text="Charge control provides automatic control to maintain an induction matrix charge level. In order to have smoother control, reactors that were activated will be held on at 0.01 mB/t for a short period before allowing them to turn off. This minimizes overshooting the charge target."}
|
TextBox{parent=svr_c_7,height=6,text="Charge control provides automatic control to maintain an induction matrix charge level. In order to have smoother control, reactors that were activated will be held on at 0.01 mB/t for a short period before allowing them to turn off. This minimizes overshooting the charge target."}
|
||||||
TextBox{parent=svr_c_7,y=8,height=3,text="You can extend this to a full minute to minimize reactors flickering on/off, but there may be more overshoot of the target."}
|
TextBox{parent=svr_c_7,y=8,height=3,text="You can extend this to a full minute to minimize reactors flickering on/off, but there may be more overshoot of the target."}
|
||||||
|
|
||||||
local ext_idling = CheckBox{parent=svr_c_7,x=1,y=12,label="Enable Extended Idling",default=ini_cfg.ExtChargeIdling,box_fg_bg=cpair(colors.yellow,colors.black)}
|
local ext_idling = Checkbox{parent=svr_c_7,x=1,y=12,label="Enable Extended Idling",default=ini_cfg.ExtChargeIdling,box_fg_bg=cpair(colors.yellow,colors.black)}
|
||||||
|
|
||||||
local function back_from_idling()
|
local function back_from_idling()
|
||||||
svr_pane.set_value(util.trinary(tmp_cfg.FacilityTankMode == 0, 3, 5))
|
svr_pane.set_value(util.trinary(tmp_cfg.FacilityTankMode == 0, 3, 5))
|
||||||
@ -714,7 +714,7 @@ local function config_view(display)
|
|||||||
|
|
||||||
local function censor_key(enable) key.censor(util.trinary(enable, "*", nil)) end
|
local function censor_key(enable) key.censor(util.trinary(enable, "*", nil)) end
|
||||||
|
|
||||||
local hide_key = CheckBox{parent=net_c_4,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
local hide_key = Checkbox{parent=net_c_4,x=34,y=12,label="Hide",box_fg_bg=cpair(colors.lightBlue,colors.black),callback=censor_key}
|
||||||
|
|
||||||
hide_key.set_value(true)
|
hide_key.set_value(true)
|
||||||
censor_key(true)
|
censor_key(true)
|
||||||
@ -749,7 +749,7 @@ local function config_view(display)
|
|||||||
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
TextBox{parent=log_c_1,x=1,y=7,text="Log File Path"}
|
||||||
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
local path = TextField{parent=log_c_1,x=1,y=8,width=49,height=1,value=ini_cfg.LogPath,max_len=128,fg_bg=bw_fg_bg}
|
||||||
|
|
||||||
local en_dbg = CheckBox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
local en_dbg = Checkbox{parent=log_c_1,x=1,y=10,default=ini_cfg.LogDebug,label="Enable Logging Debug Messages",box_fg_bg=cpair(colors.pink,colors.black)}
|
||||||
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
TextBox{parent=log_c_1,x=3,y=11,height=2,text="This results in much larger log files. It is best to only use this when there is a problem.",fg_bg=g_lg_fg_bg}
|
||||||
|
|
||||||
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
local path_err = TextBox{parent=log_c_1,x=8,y=14,width=35,text="Please provide a log file path.",fg_bg=cpair(colors.red,colors.lightGray),hidden=true}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user