this is how i call a function from menu.lua at main.lua
local menu = require("menu")
menu.drawMenu()
but how i gonna call a function from main.lua at menu.lua ? is it possible ? or set a listener or something like that
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are simply looking to provide actions for the menu, would it not be better to use a set of call back functions (as used when building GUI elements) to be triggered when menu items are clicked?
This link may help you.
http://www.troubleshooters.com/codecorn/lua/luacallbacks.htm