Hello, I found out that while I press Native Back button while Scene transition the scene goes out and comes with white Screen(Which is my default background scene). Any ideas for this?
Also I want to close my overlay with back button… Any ideas for this too?
I’m using the latest build and Testing in Win-simulator and Android 5.0
This is my source for back button detect (Based on https://forums.coronalabs.com/topic/56759-back-button-cannot-go-to-previous-scene/))
local function onKeyEvent( event ) local keyName = event.keyName local phase = event.phase local scene = composer.getSceneName( "current" ) local backscene = { ["Info"] = function () goBack ("game", 1) end, ["shop"] = function () goBack ("game", 0) end, ["inApp"] = function () goBack ("shop", 0) end, } if ("back" == keyName and phase == "down") or ("b" == keyName and phase == "down" and system.getInfo("environment") == "simulator") then if (backscene[scene]) then backscene[scene]() return true end end return false end Runtime:addEventListener("key", onKeyEvent)