Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("p2")
- os.loadAPI("lg")
- local shell = _G.shell
- local function mainButton()
- lg.setup("term")
- lg.drawBT("menu",1,lg.getSize().x,lg.getSize().y,lg.getSize().y,colors.white,colors.black," O")
- while true do
- local event, button, x, y = os.pullEvent( "mouse_click" )
- if (lg.isButton(x,y) == "menu") then
- os.reboot()
- end
- end
- lg.exit()
- end
- local namev = nil
- function sopen(names)
- shell.run(names)
- end
- local function open()
- name = namev
- sopen(name)
- end
- function openFile(name)
- namev = name
- parallel.waitForAny(open,mainButton)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement