From 250378acb455209a4b63d4323f1d5ab59b897d66 Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Sun, 2 Jun 2024 19:41:45 +0200 Subject: [PATCH] Add debug logging to listframes redraw entry --- listframes.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/listframes.lua b/listframes.lua index 58b183b..5a53343 100644 --- a/listframes.lua +++ b/listframes.lua @@ -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