OK, imagine you are on a scene called scene A.
- You press a button
- Using the “slideLeft” effect, you transition from scene A to scene A again, only with slightly different content (like showing different photos, etc.). But it is the same scene and source file.
- Repeat 1-2
However, when I do storyboard.gotoScene(currentScene), Corona simply stays at the current scene. The only ways I could think to achieve the desired effect are not satisfactory:
- Creating an “b.lua” file that has exactly the same source code as “a.lua”, and then alternate between the two each time I want to change scene. Effective, but a stupid hack.
- Use the transition class to manually slide out the current display group, and create a new display group with new content. Lots of work.
What is the easiest way to achieve what I’m trying for?
PS! Actually, I would prefer if the API was changed so that gotoScene from A to A would go to the same scene with a transition effect. (Programmers who want to avoid this would have to check if they are transitioning to the same scene and then skip the gotoScene).