From 306791613dd7414dbeb6cdaf6e9840957a5f3ed2 Mon Sep 17 00:00:00 2001 From: Cadin Batrack Date: Sun, 17 Mar 2024 16:48:22 -0700 Subject: [PATCH] add haltCutscene function --- Panels.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Panels.lua b/Panels.lua index 39438f8..2df1436 100644 --- a/Panels.lua +++ b/Panels.lua @@ -1,4 +1,4 @@ --- Panels version 1.7.3 +-- Panels version 1.7.4 -- https://cadin.github.io/panels/ import "CoreLibs/object" @@ -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