It looks like you're new here. If you want to get involved, click one of these buttons!
Hi everyone. I would like to be able to swap between two screens. i.e. I have a main screen with a chart on it and would like to have a second screen (a Settings screen) - selected when clicking on a "settings" button (or sprite) so the user can select a colour for the chart and text etc. then after clicking a "Done" button (or sprite) swap back to the Main screen. I have looked at the Codea samples but can't find anything (or maybe I missed it) Can anyone help me with a solution. Some sample code or steer me in the right direction. I would be very grateful.
Cheers
Will
Comments
@WilliamHouten Here’s a simple example of multiple screens. Tap the screen to switch between the 2 screens. A lot more control and info can be added to the screens, but this is just a quick example.
Here’s another example for multiple screens. Tap screen to switch. I just did simple sprites, but you can do anything you want on each of the screens.
Hi Dave. Thanks for your help. Being a noob, it's really helped. Can you give me some sample code to change screens if the sprite is touched rather than the screen? Would really be helpful..
Thanks mate.
Cheers
@WilliamHouten I changed the above program to tap a button to switch screens. A sprite could be used instead by replacing the rect and text statements for the button and changing the values in the touched function for the size of the sprite. I’ll let you try that. If you have trouble, let me know.
Hi Dave. That's fantastic. Exactly what I was after. Thanks so much for your help.
Cheers buddy
Will