Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadin Batrack committed Sep 23, 2023
2 parents 9da74f9 + ac7eed3 commit 93564d5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Panels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,12 @@ local function loadSequence(num)

for i, control in ipairs(sequence.advanceControls) do
buttonIndicators[i]:setButton(control.input)
buttonIndicators[i]:setPosition(control.x, control.y)

if sequence.showAdvanceControls and (control.x == nil or control.y == nil) then
local err = sequence.title or "Untitled sequence (" .. num .. ")"
printError(err, "Invalid position for advance control")
end
buttonIndicators[i]:setPosition(control.x or (i-1) * 40, control.y or 0)
end

startTransitionIn(sequence.direction, sequence.delay or 0)
Expand Down Expand Up @@ -582,19 +587,20 @@ end

local function nextSequence()
unloadSequence()
if targetSequence then
if isCutscene then
playdate.inputHandlers.pop()
gameDidFinish = true
cutsceneFinishCallback(targetSequence)
Panels.Audio.killBGAudio()
elseif targetSequence then
loadSequence(targetSequence)
targetSequence = nil
updateMenuData(sequences, gameDidFinish)
elseif currentSeqIndex < #sequences then
currentSeqIndex = currentSeqIndex + 1
loadSequence(currentSeqIndex)
updateMenuData(sequences, gameDidFinish)
elseif isCutscene then
playdate.inputHandlers.pop()
gameDidFinish = true
cutsceneFinishCallback()
Panels.Audio.killBGAudio()

else
gameDidFinish = true
updateMenuData(sequences, gameDidFinish)
Expand Down

0 comments on commit 93564d5

Please sign in to comment.