It's working, but I have not documented the API yet, so it's not clear how a script should be setup. I plan on doing this, once more stuff is implemented. I can give you a quick example:
menu.new
{
name = "Run my script!",
help = "Press SET to run the script",
select = function()
console.show()
print("Hello World!")
end
}
here's a more advanced example:
mymenu = menu.new
{
parent = "LUA",
name = "Run Test Script",
help = "Run the test script.",
submenu =
{
{
name = "Run",
help = "Run this script.",
icon_type = 5,
update = "",
},
{
name = "param1",
help = "help for param1",
min = 0,
max = 100,
warning = function() return "this param doesn't work right :P" end,
},
{
name = "param2",
help = "help for param2",
min = 0,
max = 10,
value = 5,
info = function() return "click it baby!" end,
},
{
name = "dec test",
min = 0,
max = 10000,
unit = 7,
},
{
name = "choices test",
choices = { "choice1", "choice2", "choice3" },
}
},
update = function() return mymenu.submenu["choices test"].value end,
}
mymenu.submenu["Run"].select = function()
console.show()
print("param1= "..mymenu.submenu["param1"].value)
print("param2= "..mymenu.submenu["param2"].value)
print("dec test= "..mymenu.submenu["dec test"].value)
print("choices test= "..mymenu.submenu["choices test"].value)
print("script run finished!")
end