How to create in-game back button?

So I want to create a back button in my client. Pretty obvious, right? The issue is that I can’t call a class that has already been called. So in my case, I am in the main client, choose play game, it goes to mode select and I want to press the back button. I try calling the main class again to return me to the main menu, but no dice. I know it won’t work because the class already been called. So do I need to create scenes with each screen transition for a back button to properly work? Or can I eject classes that has already been called before?

 I could also go the hard road and make a module class for each button if that would work better. What do you guys normally do for back buttons?

Thanks for reading!

P.S. I know how to implement buttons, just asking how it’s possible to go to a previous class that’s been called before.

Are you using Composer?

Nah, doing this all in code. Have not took the time to learn Composer yet, been planning on it though.

I’d recommend it, makes everything 100x easier. I don’t mean the Composer GUI visual editing tool, it’s still all code, just using the Composer library to handle scene management with the added bonus of not having to worry about disposing of display objects.

I was just looking at Storyboards and noticed it seems like it is pretty much the same thing as Composer. Is there anything different between the two? Or is the Storyboard out dated which is why Composer exists now? I definitely agree with you though. I have been reading about it and it seems like it could solve a lot of my problems where I am currently at.

Yeah that’s pretty much it, although Composer was apparently re-written from the ground up under the hood, to the developer it’s pretty much the same to work with.

I think it would be a lot more beneficial long-term for you to switch your project to Composer now than re-invent the wheel and waste time programming functionality that’s already built-in to Corona.

Agreed. Thanks a lot for your time! You helped a lot.

Actually I have one more question. Do I put all scenes within the same class? Or different classes based on which scene it is.

Are you using Composer?

Nah, doing this all in code. Have not took the time to learn Composer yet, been planning on it though.

I’d recommend it, makes everything 100x easier. I don’t mean the Composer GUI visual editing tool, it’s still all code, just using the Composer library to handle scene management with the added bonus of not having to worry about disposing of display objects.

I was just looking at Storyboards and noticed it seems like it is pretty much the same thing as Composer. Is there anything different between the two? Or is the Storyboard out dated which is why Composer exists now? I definitely agree with you though. I have been reading about it and it seems like it could solve a lot of my problems where I am currently at.

Yeah that’s pretty much it, although Composer was apparently re-written from the ground up under the hood, to the developer it’s pretty much the same to work with.

I think it would be a lot more beneficial long-term for you to switch your project to Composer now than re-invent the wheel and waste time programming functionality that’s already built-in to Corona.

Agreed. Thanks a lot for your time! You helped a lot.

Actually I have one more question. Do I put all scenes within the same class? Or different classes based on which scene it is.