I’m struggling to hide an overlay scene. It’s not actually a pause button - doesn’t stop the game, doesn’t reset it - simply shows some pictures on top. One of them is clickable and it’s supposed to hide the scene. However, it does not.
Also, objects in the parent scene still respond to clicks, even though I’ve set isModal as “true”.
I’ve already seen the template and some examples, but it didn’t help.
I would be greatful to recieve any responce.
main.lua:
local composer = require("composer") local function pause(event) local goPauseOptions = { effect = "fade", time = 500, isModal = true, } composer.showOverlay( "pause", goPauseOptions ) end pauseBtn:addEventListener("tap", pause) return scene
pause.lua:
local composer = require( "composer" ) local scene = composer.newScene() local pauseexit local function closePause (event) print("There") composer.hideOverlay( "fade", 400 ) end function scene:create(event) local sceneGroup = self.view ----background and resume button----- pauseexit:addEventListener("tap", closePause ) end scene:addEventListener( "create", scene ) return scene