Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Build = 1.0
- Codename = "Angry Koala"
- name = "Isaac OS"
- os.loadAPI = "/isaacos/system/api/isaacos.api"
- screenX, screenY = term.getSize()
- term.setBackgroundColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- os.sleep(0.1)
- while true do
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- paintutils.drawLine(1, 1, screenX, 1, colors.cyan)
- term.setTextColor(colors.black)
- term.setCursorPos(1,1)
- print("[Isaac]")
- local event, button, x, y = os.pullEventRaw("mouse_click")
- if event == "mouse_click" then
- if x >= 1 and x <= 6 then
- if y == 1 then
- paintutils.drawLine(1, 1, 6, 1, colors.cyan)
- paintutils.drawLine(1, 2, 8, 2, colors.cyan)
- paintutils.drawLine(1, 3, 8, 3, colors.cyan)
- term.setCursorPos(1,1)
- print("(Isaac)")
- print("All Programs")
- print("Restart")
- print("Shutdown")
- b = false
- local event, button, x, y = os.pullEventRaw("mouse_click")
- if event == "mouse_click" then
- if x >= 1 and x <= 8 then
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- paintutils.drawLine(1, 1, screenX, 1, colors.blue)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.lightBlue)
- if y == 2 then -- shell
- print("Going to Programs!")
- sleep(0)
- shell.run("/isaacos/Programs/program.lua")
- elseif y == 3 then -- restart
- term.clear()
- term.setCursorPos(1,1)
- print("Restarting System.")
- os.sleep(1.5)
- os.reboot()
- elseif y == 4 then -- shutdown
- term.clear()
- term.setCursorPos(1,1)
- print("Shutting down")
- os.sleep(1.5)
- os.shutdown()
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement