From b9dff29b549e965bd86c42dbf0c7c96b88d95ad7 Mon Sep 17 00:00:00 2001 From: Frederick Meisel Date: Thu, 22 Feb 2024 23:23:15 +0100 Subject: [PATCH] Hurensohn commit 2 --- PowerManager.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/PowerManager.lua b/PowerManager.lua index c54d04e..b7734b4 100644 --- a/PowerManager.lua +++ b/PowerManager.lua @@ -154,13 +154,12 @@ os.sleep(1) clearScreen() while true do - local _,_,x,y = event.pull( 1, "touch" ) drawDesktop() - if x < 10 and y < 10 then - numberOfPanels = numberOfPanels + 1 - elseif x > 10 and Y > 10 then - numberOfPanels = numberOfPanels - 1 - else + local id, _, x, y = event.pullMultiple("touch", "interrupted") + if id == "interrupted" then + print("soft interrupt, closing") + goto quit + elseif id == "touch" then goto quit end end