mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
bottom align process control panel and induction matrix view
This commit is contained in:
parent
3e74d6c998
commit
c77993d3a0
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -15,5 +15,8 @@
|
||||
"periphemu",
|
||||
"mekanismEnergyHelper",
|
||||
"_HOST"
|
||||
],
|
||||
"Lua.diagnostics.disable": [
|
||||
"duplicate-set-field"
|
||||
]
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ local iocontrol = require("coordinator.iocontrol")
|
||||
local renderer = require("coordinator.renderer")
|
||||
local sounder = require("coordinator.sounder")
|
||||
|
||||
local COORDINATOR_VERSION = "beta-v0.8.18"
|
||||
local COORDINATOR_VERSION = "beta-v0.9.0"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
|
@ -29,7 +29,7 @@ local function new_view(root, x, y, data, ps, id)
|
||||
local title = "INDUCTION MATRIX"
|
||||
if type(id) == "number" then title = title .. id end
|
||||
|
||||
local matrix = Div{parent=root,fg_bg=style.root,width=33,height=25,x=x,y=y}
|
||||
local matrix = Div{parent=root,fg_bg=style.root,width=33,height=24,x=x,y=y}
|
||||
|
||||
TextBox{parent=matrix,text=" ",width=33,height=1,x=1,y=1,fg_bg=cpair(colors.lightGray,colors.gray)}
|
||||
TextBox{parent=matrix,text=title,alignment=TEXT_ALIGN.CENTER,width=33,height=1,x=1,y=2,fg_bg=cpair(colors.lightGray,colors.gray)}
|
||||
|
@ -79,18 +79,25 @@ local function init(monitor)
|
||||
|
||||
-- command & control
|
||||
|
||||
TextBox{parent=main,y=cnc_y_start,text=util.strrep("\x8c", header.width()),alignment=TEXT_ALIGN.CENTER,height=1,fg_bg=cpair(colors.lightGray,colors.gray)}
|
||||
cnc_y_start = cnc_y_start
|
||||
|
||||
cnc_y_start = cnc_y_start + 2
|
||||
-- induction matrix and process control interfaces are 24 tall + space needed for divider
|
||||
local cnc_bottom_align_start = main.height() - 26
|
||||
|
||||
local process = process_ctl(main, 2, cnc_y_start)
|
||||
assert(cnc_bottom_align_start >= cnc_y_start, "main display not of sufficient vertical resolution (add an additional row of monitors)")
|
||||
|
||||
TextBox{parent=main,y=cnc_bottom_align_start,text=util.strrep("\x8c", header.width()),alignment=TEXT_ALIGN.CENTER,height=1,fg_bg=cpair(colors.lightGray,colors.gray)}
|
||||
|
||||
cnc_bottom_align_start = cnc_bottom_align_start + 2
|
||||
|
||||
local process = process_ctl(main, 2, cnc_bottom_align_start)
|
||||
|
||||
-- testing
|
||||
---@fixme remove test code
|
||||
|
||||
-- ColorMap{parent=main,x=98,y=(main.height()-1)}
|
||||
|
||||
local audio = Div{parent=main,width=23,height=23,x=107,y=cnc_y_start}
|
||||
local audio = Div{parent=main,width=23,height=23,x=107,y=cnc_bottom_align_start}
|
||||
|
||||
PushButton{parent=audio,x=16,y=1,text="TEST 1",min_width=8,fg_bg=cpair(colors.black,colors.yellow),active_fg_bg=cpair(colors.white,colors.gray),callback=sounder.test_1}
|
||||
PushButton{parent=audio,x=16,text="TEST 2",min_width=8,fg_bg=cpair(colors.black,colors.yellow),active_fg_bg=cpair(colors.white,colors.gray),callback=sounder.test_2}
|
||||
@ -116,7 +123,7 @@ local function init(monitor)
|
||||
SwitchButton{parent=audio,x=1,text="RCS TRANSIENT",min_width=23,fg_bg=cpair(colors.black,colors.yellow),active_fg_bg=cpair(colors.white,colors.gray),callback=sounder.test_rcs}
|
||||
SwitchButton{parent=audio,x=1,text="TURBINE TRIP",min_width=23,fg_bg=cpair(colors.black,colors.yellow),active_fg_bg=cpair(colors.white,colors.gray),callback=sounder.test_turbinet}
|
||||
|
||||
local imatrix_1 = imatrix(main, 131, cnc_y_start, facility.induction_data_tbl[1], facility.induction_ps_tbl[1])
|
||||
local imatrix_1 = imatrix(main, 131, cnc_bottom_align_start, facility.induction_data_tbl[1], facility.induction_ps_tbl[1])
|
||||
|
||||
return main
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user