Menu help.?

So I’m new to programming and I need help with a menu. I’ve made a gun app but I need a way to click a gun name and it goes to that gun. So that is what the menu would be. Also is it done by class so I don’t have to add all the guns to one class.

Unfortunately, Codea doesn’t support menus, dropdown lists or similar UI items. People have written libraries to provide this functionality, but what I suggest you rather do is provide a list of weapon icons onscreen for people to choose from, which is more fun.

Then, when the user touches the screen, you need to check which icon they clicked on.

To find out about this and many other Codea features, I strongly suggest you look at the tutorials listed on the wiki link above. It’s well worth it.

And you can build your classes any way you want. In your case, you might want a general gun class, with specific sub-classes for specific guns, that add extra features. I have an ebook on Lua (the language behind Codea) - have a look at the chapters on classes and on inheritance - link below

https://www.dropbox.com/s/qh1e7ft4rvhlpt2/Lua%20for%20beginners.pdf

Alright, thank you for the advice !