From eadd590f3c2a91bc218d8d5fb9d0726b3abcb1ef Mon Sep 17 00:00:00 2001 From: mint Date: Fri, 7 May 2021 15:08:15 -0400 Subject: [PATCH] making the music stop when you close rhythmblock --- rhythmblock.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rhythmblock.lua b/rhythmblock.lua index 4b655ca..0383c69 100644 --- a/rhythmblock.lua +++ b/rhythmblock.lua @@ -156,6 +156,7 @@ while true do elseif eventData[2] == 1 and eventData[3] >= centerWidth - 2 and eventData[4] >= centerHeight + 4 and eventData[3] <= centerWidth + 2 and eventData[4] <= centerHeight + 4 then -- If the user clicks on the eject button it'll eject the disc ejectDisc() elseif eventData[2] == 1 and eventData[3] == width and eventData[4] == 1 then -- If the user presses the X it'll quit + stopDisc() term.clear() term.setCursorPos(1, 1) return true @@ -171,6 +172,7 @@ while true do elseif name == "e" then ejectDisc() elseif name == "q" then + stopDisc() term.clear() term.setCursorPos(1, 1) return true