#149 validate display sizes on startup

This commit is contained in:
Mikayla Fischler
2023-02-03 15:19:00 -05:00
parent 53e4576547
commit 72791d042b
4 changed files with 43 additions and 3 deletions

View File

@@ -35,6 +35,8 @@ local period = core.flasher.PERIOD
---@param x integer top left x
---@param y integer top left y
local function new_view(root, x, y)
assert(root.height() >= (y + 24), "main display not of sufficient vertical resolution (add an additional row of monitors)")
local facility = iocontrol.get_db().facility
local units = iocontrol.get_db().units

View File

@@ -39,6 +39,8 @@ local function make(parent, x, y, unit)
height = 25
end
assert(parent.height() >= (y + height), "main display not of sufficient vertical resolution (add an additional row of monitors)")
-- bounding box div
local root = Div{parent=parent,x=x,y=y,width=80,height=height}