How do you use timer.resume when using storyboard.overlay()?

In my main scene, I have a pause screen being called via storyboard.showOverlay(“pauseScreen”, {effect = “fade”  , isModal = true} )

When this pause screen is called, I use timer.pause(myTimer). It pauses just fine, but once the pause screen overlay is closed, the timer stays paused. How do I use timer.resume in this case?

In other words, how do you unpause the timer if using storyboard.showOverlay?

fyi here’s my timer function:

gameTimer = timer.performWithDelay(1000, updateTime, 0)

Hi. There is an “overlayEnded” function for when the overlay is closed, you can use your update function there, to resume the game.

function scene:overlayEnded( event ) print( "Overlay removed: " .. event.sceneName ) end scene:addEventListener( "overlayEnded" )

Wow… Thanks!!! 

Those few lines of code was really all it takes. This one has been a head scratcher all day long.

Thx again

Hi. There is an “overlayEnded” function for when the overlay is closed, you can use your update function there, to resume the game.

function scene:overlayEnded( event ) print( "Overlay removed: " .. event.sceneName ) end scene:addEventListener( "overlayEnded" )

Wow… Thanks!!! 

Those few lines of code was really all it takes. This one has been a head scratcher all day long.

Thx again