mirror of
https://fem.mint.lgbt/m/Rhythmblock.git
synced 2024-08-14 20:27:11 +00:00
making the music stop when you close rhythmblock
This commit is contained in:
parent
493dcf278b
commit
eadd590f3c
1 changed files with 2 additions and 0 deletions
|
@ -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
|
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()
|
ejectDisc()
|
||||||
elseif eventData[2] == 1 and eventData[3] == width and eventData[4] == 1 then -- If the user presses the X it'll quit
|
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.clear()
|
||||||
term.setCursorPos(1, 1)
|
term.setCursorPos(1, 1)
|
||||||
return true
|
return true
|
||||||
|
@ -171,6 +172,7 @@ while true do
|
||||||
elseif name == "e" then
|
elseif name == "e" then
|
||||||
ejectDisc()
|
ejectDisc()
|
||||||
elseif name == "q" then
|
elseif name == "q" then
|
||||||
|
stopDisc()
|
||||||
term.clear()
|
term.clear()
|
||||||
term.setCursorPos(1, 1)
|
term.setCursorPos(1, 1)
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue