making the music stop when you close rhythmblock

This commit is contained in:
Lux Aliaga 2021-05-07 15:08:15 -04:00
parent 493dcf278b
commit eadd590f3c

View file

@ -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