Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function os.programs()
- term.setBackgroundColor(colors.cyan)
- term.clear()
- paintutils.drawLine(1, 1, screenX, 1, colors.lightGray)
- term.setCursorPos(1, 3)
- term.setBackgroundColor(colors.cyan)
- term.setTextColor(colors.black)
- print("[File Manager]")
- term.setCursorPos(1, 1)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.lightGray)
- print("[Exit]")
- term.setCursorPos(1, 4)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.cyan)
- print("[Taco Text Editor]")
- term.setCursorPos(1, 5)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.cyan)
- print("[Install Software]")
- term.setCursorPos(1, 6)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.cyan)
- print("[Update Software]")
- term.setCursorPos(39, 1)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.lightGray)
- print("Version "..build) -- Version of the OS
- while true do
- local event, button, X, Y = os.pullEvent("mouse_click")
- if event == "mouse_click" then
- if X >= 1 and X <= 20 and Y == 3 and button == 1 then
- shell.run("//.orange/gfb")
- elseif X >= 1 and X <= 19 and Y == 1 and button == 1 then
- break
- elseif X >= 1 and X <= 18 and Y == 4 and button == 1 then
- shell.run("//.orange/taco")
- elseif X >= 1 and X <= 17 and Y == 5 and button == 1 then
- shell.run("//.orange/app/install.o")
- elseif X >= 1 and X <= 16 and Y == 6 and button == 1 then
- print("Updating!")
- while true do
- resp = http.get("http://pastebin.com/raw.php?i=iM6Zw0XZ")
- if resp then
- fileHandler=fs.open("//.orange/orange", "w")
- fileHandler.write(resp.readAll())
- fileHandler.close()
- os.sleep(1)
- os.reboot()
- else
- print("Update Failed! Cuase: NO internet connection")
- os.sleep(1)
- os.reboot()
- end
- end
- end
- end
- end
- end
- function icon1()
- image = paintutils.loadImage("//.orange/icon/icon1")
- paintutils.drawImage(image, 1, 3)
- end
- screenX, screenY = term.getSize()
- function main()
- term.clear()
- term.setBackgroundColor(colors.cyan)
- term.clear()
- paintutils.drawLine(1, 1, screenX, 1, colors.lightGray)
- term.setCursorPos(1, 1)
- term.setTextColor(colors.black)
- print("[Test]")
- end
- Codename = "Juice"
- build = "1.6"
- osname = "Orange OS"
- desc = "A fruit that can change Computercraft!"
- os.loadAPI("//.orange/oos")
- while true do
- term.clear()
- term.setBackgroundColor(colors.cyan)
- term.clear()
- paintutils.drawLine(1, 1, screenX, 1, colors.lightGray)
- term.setCursorPos(39, 1)
- term.setTextColor(colors.black)
- print("Version "..build)
- term.setCursorPos(1, 1)
- term.setTextColor(colors.black)
- print("[Orange]")
- local event, button, X, Y = os.pullEvent("mouse_click")
- if event == "mouse_click" then
- if X >= 1 and X <= 10 and Y == 1 and button == 1 then
- paintutils.drawLine(1, 1, 6, 1, colors.gray)
- paintutils.drawLine(1, 2, 8, 2, colors.gray)
- paintutils.drawLine(1, 3, 8, 3, colors.gray)
- paintutils.drawLine(1, 4, 8, 4, colors.gray)
- paintutils.drawLine(1, 5, 8, 5, colors.gray)
- term.setCursorPos(1, 1)
- print("[Orange]")
- print("Run")
- print("[Programs]")
- print("Restart")
- print("Shutdown")
- b = false
- local event, button, X, Y = os.pullEvent("mouse_click")
- if event == "mouse_click" then
- if X >= 1 and X <= 6 then
- term.setBackgroundColor(colors.cyan)
- term.clear()
- paintutils.drawLine(1, 1, screenX, 1, colors.lightGray)
- term.setCursorPos(1, 1)
- term.setTextColor(colors.black)
- if Y == 2 then
- print("Run")
- input = read()
- shell.run(input)
- elseif Y == 3 then
- os.programs()
- elseif Y == 4 then
- os.reboot()
- elseif Y == 5 then
- os.shutdown()
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement