Skip to content

Commit

Permalink
add haltCutscene function
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadin Batrack committed Mar 17, 2024
1 parent 3246fa4 commit 3067916
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Panels.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Panels version 1.7.3
-- Panels version 1.7.4
-- https://cadin.github.io/panels/

import "CoreLibs/object"
Expand Down Expand Up @@ -1051,6 +1051,14 @@ function setDefaultFont()
end
end

-- call this if you need to interrupt a cutscene (from a menu option for example)
-- this should clean up panel and sequence audio that normally happens when the cutscene completes
function Panels.haltCutscene()
Panels.Audio.killBGAudio()
unloadSequence()
playdate.inputHandlers.pop()
end

function Panels.startCutscene(comicData, callback)
setDefaultFont()
isCutscene = true
Expand Down

0 comments on commit 3067916

Please sign in to comment.