Add debug logging to listframes redraw entry
This commit is contained in:
parent
d0c8d867ab
commit
250378acb4
|
@ -3,6 +3,7 @@ local subFrames = {}
|
|||
local length = 0
|
||||
local frame = term.current()
|
||||
local drawEntry = nil
|
||||
local debugLog = fs.open("listframes.debug", "w")
|
||||
|
||||
-- pagination start line (not number of entries!)
|
||||
local paginationPos = 1
|
||||
|
@ -58,7 +59,10 @@ local function redrawEntry(idx)
|
|||
local tw, th = frame.getSize()
|
||||
local xPos, yPos = entryFrame.getPosition()
|
||||
local xSize, ySize = entryFrame.getSize()
|
||||
entryFrame.setVisible((yPos+ySize-1) >= paginationPos and yPos <= th)
|
||||
local visibile = (yPos+ySize-1) >= paginationPos and yPos <= th
|
||||
debugLog.writeLine("[redrawEntry] idx="..idx..", yPos="..yPos..", visible="..visibile)
|
||||
debugLog.flush()
|
||||
entryFrame.setVisible(visibile)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue