Question: If I have a menu system with XX widgets. How to I records the last menu?

Hi All

Making a widget only game, how would I make a button, that would go back to the last menu (Widget) I was last at?

You could do a Menu State System in a ENUM and create of that type specific variables, such as Current Menu State, Last Menu State and Incoming Menu State.

Now each you change menu, you change the ENUM, but also saving the Current State into the Last State. Now when wanting to go back, you call the Last State.

Hope that helps, if you need a better example I can visualize that for you, but give it a try.

Thanks

Never used ENUMs, so any further help would be helpful.

Regards