Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("zipmenu")
- local menu = {}
- table.insert(menu, "hello")
- table.insert(menu, "this is a test menu")
- for i = 1, 100 do
- table.insert(menu, "option " .. i)
- end
- for i = 105, 200, 5 do
- table.insert(menu, "option " .. i)
- end
- for i = 210, 500, 10 do
- table.insert(menu, "option " .. i)
- end
- for i = 600, 5000, 100 do
- table.insert(menu, "option " .. i)
- end
- local menu2 = {}
- for a, b in pairs(_G) do
- table.insert(menu2, a)
- end
- zipmenu.setColors(colors.white, colors.cyan, colors.gray, colors.white, colors.yellow)
- local choice = zipmenu.drawMenu("Choose a menu to view:", "test menu", "global var menu", "Exit")
- if choice == 1 then
- print("The choice was " .. zipmenu.drawMenu("test menu", menu) .. "!")
- elseif choice == 2 then
- print("The choice was " .. zipmenu.drawMenu("global var menu", menu2) .. "!")
- else
- print("Bye!")
- end
Add Comment
Please, Sign In to add comment