fixed some visual bugs
This commit is contained in:
15
display.lua
15
display.lua
@ -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
|
||||
|
||||
@ -586,7 +586,7 @@ local function selectGateFromList(isHazardGate)
|
||||
-- YES clicked
|
||||
confirmed = true
|
||||
break
|
||||
elseif cx >= 18 and cx <= 22 then
|
||||
elseif cx >= 17 and cx <= 21 then
|
||||
-- NO clicked
|
||||
break
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user