Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- if not BobCatAPI then
- os.loadAPI(fs.combine(fs.getDir(shell.getRunningProgram()), "BobCatAPI"))
- end
- local Nav = BobCatAPI.Navigation:new()
- local Gui = Nav.Gui
- Gui:draw()
- while true do
- local eArgs = {os.pullEventRaw()}
- local event = eArgs[1]
- if event == "mouse_scroll" then
- Gui:setY(Gui.y+eArgs[2])
- Gui:draw()
- elseif event == "mouse_click" then
- Gui:click(eArgs[3], eArgs[4])
- Gui:draw()
- elseif event == "terminate" then
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColour(colours.black)
- term.setTextColour(colours.white)
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment