- Topics: 156
- Replies: 2940
- Total: 3096
It really depends on what you want to do with the menu. The result of the menu selected by the user is numeric, so you need to decide in Lua based on that number what will happen next.
You can wrap that in a method sure. If you want you can wrap the whole menu creation process in a method, passing it an array of choices and handler functions for each numeric option. In Lua functions are variables and can be held in tables so you’re golden. But like i wrote it depends on what you want to do.