ShowOverlay on wrong height

I have a strange problem. I’m using ShowOverlay and it’s working in some situations but I recently added it to my level select screen and the level select is appearing behind everything and so I can’t click on any of the buttons.

Here’s a screenshot of the weirdness - the pink blobby character should be behind the buttons - http://d.pr/i/vjHH

The code I am using for loading the overlay is below - it’s not particularly complicated :slight_smile:

 -- why on earth doesn't this load on top local overlay\_options = { effect = "slideUp", time = 500, isModal = true, params = { level = self.level } } storyboard.showOverlay( "overlay\_level\_select" , overlay\_options )

Has anyone seen this before? Would appreciate any help you can offer.

Hmm - just had a thought. I am doing the following in my main.lua. Could this be affecting things?

local display\_stage = display.getCurrentStage() display\_stage:insert( game\_background ) display\_stage:insert( storyboard.stage )

If you are going to use Storyboard to manage things, you have to use storyboard to manage things.  By design, any thing you do not put into a storyboard group stays on top of the screen.  By adding the background in main.lua (and it’s not part of a storyboard scene), it will always be on top.

The thing is the background is at the back - the character is part of a scene that’s in storyboard and the overlay is loaded from the scene that’s in storyboard.

That said I’ll see if I can remove the background stuff and see if that fixes things. That could be where the confusion comes from.

I simplified my approached and changed the level select screen to a scene rather than an overlay and now it’s working fine. Shame, cos I like the overlay approach - but I don’t want to spend too long trying to work it out.

Thanks for your help :slight_smile:

Hmm - just had a thought. I am doing the following in my main.lua. Could this be affecting things?

local display\_stage = display.getCurrentStage() display\_stage:insert( game\_background ) display\_stage:insert( storyboard.stage )

If you are going to use Storyboard to manage things, you have to use storyboard to manage things.  By design, any thing you do not put into a storyboard group stays on top of the screen.  By adding the background in main.lua (and it’s not part of a storyboard scene), it will always be on top.

The thing is the background is at the back - the character is part of a scene that’s in storyboard and the overlay is loaded from the scene that’s in storyboard.

That said I’ll see if I can remove the background stuff and see if that fixes things. That could be where the confusion comes from.

I simplified my approached and changed the level select screen to a scene rather than an overlay and now it’s working fine. Shame, cos I like the overlay approach - but I don’t want to spend too long trying to work it out.

Thanks for your help :slight_smile: