Switch from overlay to scene issue

Hey all, i’m working on a project for my internship company which involves creating a “portfolio/projects app” for the company itself. I started about 1 week ago with Corona/Lua and it’s going very well but I got my first problem now for which I can’t find any solution.

What I want:
For general information: I’m working with a tabbar at the bottom of the screen to switch between News, Projects, Portfolio, etc. Switching between the tabs works with a gotoScene() and slideLeft as transition.
In scene “projects” i’m showing a list of several projectitems. When I select one of those, an overlay (“projectinfo”) slides in from the right which shows information about the project. If I want to close the overlay I simply press the backbutton in the header which hides the overlay (with a slideRight). However, if i do not press the backbutton but press on another tab when overlay “projectinfo” is showing I want it WITH the current scene “projects” to hide using a slideLeft (with the “projectinfo” on top of “projects”).

The problem:
When i press another tab “projectinfo” disappears immediately and i only see “projects” sliding to the left.

To make it a bit clearer:

http://www.youtube.com/watch?v=LvvHj0uuudE

At 0:12 you see the problem. I’ve been trying to solve this problem for hours now but still can’t manage to get it working the way I want it to work.

I would really appreciate it if someone can help me with this. If code is needed tell me, although I think the solution should be very easy but I just can’t manage to find it.

Thanks in advance!

With Regards,
Spanky [import]uid: 189912 topic_id: 32603 reply_id: 332603[/import]

I’m not exactly one to speak about any sort of overlay experience, but I do recall that you need to kill the overlay before switching scenes. (each overlay is dependent on the scene it was spawned in) So what I would suggest is that in your code where gotoScene is called, do a check for an active overlay first, and if found,

  1. close the overlay gracefully (storyboard.hideOverlay with your choice of effect)
  2. *on completion*, trigger gotoScene

If you want the gotoScene to function without closing the overlay, you may have to resort to something more rigorous like capturing an image of the screen to hide the overlay while you get rid of it. (Sadly I have no idea what code’s involved in that one) [import]uid: 41884 topic_id: 32603 reply_id: 129692[/import]

Thanks Richard.

The problem is though that I want both the overlay and scene to slideleft at the same time, with the overlay on top (so you can’t see the scene). Letting the overlay slide first and after that the scene was no problem, but simultaneously is the issue for which I can’t find a solution.

Spanky [import]uid: 189912 topic_id: 32603 reply_id: 129714[/import]

I’m not exactly one to speak about any sort of overlay experience, but I do recall that you need to kill the overlay before switching scenes. (each overlay is dependent on the scene it was spawned in) So what I would suggest is that in your code where gotoScene is called, do a check for an active overlay first, and if found,

  1. close the overlay gracefully (storyboard.hideOverlay with your choice of effect)
  2. *on completion*, trigger gotoScene

If you want the gotoScene to function without closing the overlay, you may have to resort to something more rigorous like capturing an image of the screen to hide the overlay while you get rid of it. (Sadly I have no idea what code’s involved in that one) [import]uid: 41884 topic_id: 32603 reply_id: 129692[/import]

Like I said, the docs say you have to kill the scene before using gotoScene, so if you don’t the storyboard behavior is going to be wonky.

If the scene was completely invisible I would suggest the captureimage route but since I see that’s not entirely true you might need to just fake the overlay or directly manipulate it yourself. (Not really sure if the latter is possible, though…) [import]uid: 41884 topic_id: 32603 reply_id: 129718[/import]

Will think about it. I was so thinking about changing the overlay to a normal scene but that brings some downsides with itself. Thanks for the effort Richard, really appreciate it! :slight_smile:

Of someone still knows a possibility to do what I want please do tell!

Spanky [import]uid: 189912 topic_id: 32603 reply_id: 129724[/import]

Thanks Richard.

The problem is though that I want both the overlay and scene to slideleft at the same time, with the overlay on top (so you can’t see the scene). Letting the overlay slide first and after that the scene was no problem, but simultaneously is the issue for which I can’t find a solution.

Spanky [import]uid: 189912 topic_id: 32603 reply_id: 129714[/import]

Like I said, the docs say you have to kill the scene before using gotoScene, so if you don’t the storyboard behavior is going to be wonky.

If the scene was completely invisible I would suggest the captureimage route but since I see that’s not entirely true you might need to just fake the overlay or directly manipulate it yourself. (Not really sure if the latter is possible, though…) [import]uid: 41884 topic_id: 32603 reply_id: 129718[/import]

Will think about it. I was so thinking about changing the overlay to a normal scene but that brings some downsides with itself. Thanks for the effort Richard, really appreciate it! :slight_smile:

Of someone still knows a possibility to do what I want please do tell!

Spanky [import]uid: 189912 topic_id: 32603 reply_id: 129724[/import]