Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("xos/api/menu")
- local xxMenu,yyMenu = 0,0
- local menu_options =
- {
- [1] = {text="Command ", yMenu=1, xMenu=1, yPos=8, xPos=9, color=colors.yellow},
- [2] = {text="Programs", yMenu=2, xMenu=1, yPos=9, xPos=9, color=colors.yellow},
- [3] = {text="Accounts", yMenu=3, xMenu=1, yPos=10, xPos=9, color=colors.yellow},
- [4] = {text="Details ", yMenu=4, xMenu=1, yPos=11, xPos=9, color=colors.yellow},
- [5] = {text="Shutdown", yMenu=5, xMenu=1, yPos=12, xPos=9, color=colors.red},
- [6] = {text="Settings", yMenu=1, xMenu=2, yPos=8, xPos=21, color=colors.yellow},
- [7] = {text="Scripts ", yMenu=2, xMenu=2, yPos=9, xPos=21, color=colors.yellow},
- [8] = {text="Attacks ", yMenu=1, xMenu=3, yPos=8, xPos=33, color=colors.yellow},
- [9] = {text="Internet", yMenu=2, xMenu=3, yPos=9, xPos=33, color=colors.yellow},
- [10] = {text="ServerFr", yMenu=3, xMenu=3, yPos=10, xPos=33, color=colors.yellow},
- [11] = {text=" Back ", yMenu=99, xMenu=0, yPos=14, xPos=21, color=colors.blue},
- [12] = {text="Start Menu", yMenu=YY, xMenu=XX, yPos=6, xPos=20, color=colors.white},
- }
- xxMenu,yyMenu = menu.displayMenu(menu_options, true, true) -- menu api call
- term.clear() -- only for testing purposes
- term.setCursorPos(8,9) -- only for testing purposes
- if yyMenu == 1 and xxMenu == 1 then
- print("You have chosen the 'Command' option.")
- elseif yyMenu == 2 and xxMenu == 1 then
- print("You have chosen the 'Programs' option.")
- elseif yyMenu == 3 and xxMenu == 1 then
- print("You have chosen the 'Accounts' option.")
- elseif yyMenu == 4 and xxMenu == 1 then
- print("You have chosen the 'Details' option.")
- elseif yyMenu == 5 and xxMenu == 1 then
- print("You have chosen the 'Shutdown' option.")
- elseif yyMenu == 1 and xxMenu == 2 then
- print("You have chosen the 'Settings' option.")
- elseif yyMenu == 2 and xxMenu == 2 then
- print("You have chosen the 'Scripts' option.")
- elseif yyMenu == 1 and xxMenu == 3 then
- print("You have chosen the 'Attacks' option.")
- elseif yyMenu == 2 and xxMenu == 3 then
- print("You have chosen the 'Internet' option.")
- elseif yyMenu == 3 and xxMenu == 3 then
- print("You have chosen the 'SeverFr' option.")
- elseif yyMenu == 99 and xxMenu == 0 then
- print("You have chosen the 'back' option.")
- end
Add Comment
Please, Sign In to add comment