Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function l(sx,sy,ex,ey,lcolor)
- paintutils.drawLine(sx,sy,ex,ey,lcolor)
- end
- function p(x,y,color)
- paintutils.drawPixel(x,y,color)
- end
- function drawDesktop()
- term.clear()
- term.setCursorPos(1,1)
- p(1,1,colors.blue)
- end
- function ani(char)
- term.clear()
- term.setCursorPos(1,1)
- write(char)
- sleep(0.2)
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Loading windows XP...")
- sleep(1)
- ani("|")
- ani("/")
- ani("-")
- ani("\\")
- ani("|")
- ani("/")
- ani("-")
- ani("\\")
- ani("|")
- ani("/")
- ani("-")
- ani("\\")
- ani("|")
- while true do
- drawDesktop()
- nTime = os.time()
- event, button, mx, my = os.pullEvent("mouse_click")
- if button == 1 then
- if mx == 1 and my == 1 then
- l(1,2,10,2,colors.blue)
- l(1,2,1,17,colors.blue)
- l(10,2,10,17,colors.blue)
- l(1,17,10,17,colors.blue)
- p(9,16,colors.red)
- p(8,16,colors.green)
- p(7,16,colors.orange)
- event, bbutton , mmx ,mmy = os.pullEvent("mouse_click")
- if bbutton == 1 then
- if mmx == 9 and mmy == 16 then
- sleep(1)
- os.shutdown()
- elseif mmx == 8 and mmy == 16 then
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- break
- elseif mmx == 7 and mmy == 16 then
- term.setBackgroundColor(colors.black)
- term.setCursorPos(10,1)
- print("The time is "..textutils.formatTime(nTime,false))
- sleep(3)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement