fixed some visual bugs

This commit is contained in:
2026-01-02 17:10:23 -05:00
parent f5657a1799
commit 73ded39e15
2 changed files with 9 additions and 8 deletions

View File

@ -96,27 +96,28 @@ function display.screenWrite(list, fcount, fy)
-- Skip if this is the local gate
if not isLocalGate then
local x1, x2 = 0, 0
local gateName = list[i][1]
local nameLength = #gateName
-- Use two columns instead of three to prevent overlapping
if fcount == 0 then
x = 2
fcount = 1
elseif fcount == 1 then
x = 11
fcount = 2
else
x = 20
x = 16
fcount = 0
fy = fy + 2
end
mon.setCursorPos(x, fy)
mon.write(list[i][1])
mon.write(gateName)
-- Set button width based on name length (minimum 7 characters)
x1 = x
x2 = x + 7
x2 = x + math.max(nameLength - 1, 7)
table.insert(buttonXY, { x1, x2, fy })
table.insert(computerNames, list[i][1])
table.insert(computerNames, gateName)
table.insert(computerAddresses, list[i][2])
-- Store hazard reason if present (third element in hazard gates)
if list[i][3] then