Making a storyboard scene as a popup

I’ve found out there is a way to make a storyboard scene as a “popup” over another scene such that you can still see the underlying scene.

All you have to do is when you call the popup:

storyboard.gotoScene("popupmenu")  

make sure that in the “enterScene” event of popupmenu.lua, you need to add this code:

local gameScreen = storyboard.getScene( "gamescreen" ) -- this is the scene below the popup  
gameScreen.view.isVisible = true  
gameScreen.view:toBack()  

and in the “exitScene” event put this:

local gameScreen = storyboard.getScene( "gamescreen" ) -- this is the scene below the popup  
gameScreen.view.isVisible = false  

(Even if you are returning to “gamescreen,” setting the isVisible property will not have an adverse effect because the storyboard will immediately return it to visible)

I don’t know if anyone will find this helpful, but I was excited to find out. [import]uid: 62193 topic_id: 20451 reply_id: 320451[/import]

Cool things you can do include placing a black rectangle over “gamescreen” with alpha 0.5 to give the effect that the screen below the popup is darkened out, making the popup menu stand out more. Put this in the “exitscene” of “gamescreen”

Also make sure to disable event listeners because buttons, etc. will still be pushable if they are visible around the popup menu.

Here is an example (just a simple test):

[import]uid: 62193 topic_id: 20451 reply_id: 80106[/import]

Thanks for sharing!
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 20451 reply_id: 80116[/import]

Very useful! [import]uid: 19626 topic_id: 20451 reply_id: 80120[/import]

Is there any sample code out there that show this approach? [import]uid: 6288 topic_id: 20451 reply_id: 83899[/import]

Has anyone else had any problems with this method?
Sometimes the popup appears without any problems, other times I get the following error and the simulator crashes completely:

/Applications/CoronaSDK/Corona Terminal: line 9: 45681 Bus error: 10 $path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $*
logout

In addition, my “game” scene never reappears. When it doesn’t crash, I’m left with an empty blank screen?

Edit: Updated Corona and the problem seems to have gone away, maybe I was using a really old build? [import]uid: 84115 topic_id: 20451 reply_id: 103061[/import]

You can also just use [lua]storyboard.showOverlay(“scene_name”)[/lua]
[import]uid: 181011 topic_id: 20451 reply_id: 139433[/import]

You can also just use [lua]storyboard.showOverlay(“scene_name”)[/lua]
[import]uid: 181011 topic_id: 20451 reply_id: 139433[/import]