i have this in a main.lua so that the player can double tap to check info on the game , regardless of the scene. It shows the first the first time but afret that it refuses to hide itself or even get to the elseif statement
local data = require "data" Runtime:addEventListener("tap", function (event) if data.isntLevel then return false elseif event.numTaps == 2 then print( data.isShowingInfo ) if data.isShowingInfo%2 == 1 then composer.showOverlay("levelinfo", {isModal = true}) else print("hidden") composer.hideOverlay("levelinfo") end data.isShowingInfo = data.isShowingInfo +1 return true end end)