Strategies for creating a preferences screen

I’m just getting started with Corona, and having a great time.

I’m thinking of ways to create a preferences screen. I need to switch between two different screens and be able to share variables between the two screens.

I guess I can make both screens in groups and hide and show the one or the other. If I create them in the same file any variables should be available to both.

I was also looking at the Director module. It seems this separates screens into different Lua files. Which, if I understand scope in Lua, would make it hard to share variables. Though I suppose I could use global variables for shared info.

I’m looking for ideas. Is there a common technique for this?

On a related note, is it possible to create a local database with Corona for saving game information? [import]uid: 98652 topic_id: 17665 reply_id: 317665[/import]

For saving game info, I’ve been recommending Ice to a lot of people lately - it’s very popular; http://developer.anscamobile.com/code/ice

For your preferences, you could save the info in a file or you could use globals (although you want to avoid using those as much as possible).

Peach :slight_smile: [import]uid: 52491 topic_id: 17665 reply_id: 67235[/import]