Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(1)
- term.clear()
- function titlebar()
- term.setCursorPos(1,1)
- term.setBackgroundColor(128)
- term.clearLine()
- term.setTextColour(256)
- term.setCursorPos(4,1)
- textutils.slowPrint("KotofeyOS ver.0.2 (Beta)")
- term.setCursorPos(1,25)
- end
- function desktop()
- term.setBackgroundColor(1)
- term.clear()
- bg1 = paintutils.loadImage("bg1")
- paintutils.drawImage(bg1,1,1)
- titlebar()
- end
- desktop()
- while true do
- local event, button, xPos, yPos = os.pullEvent("mouse_click")
- if xPos>=1 and xPos<=3 and yPos>=18 and yPos<= 19 then
- shell.run("power")
- end
- function bar()
- pus=1
- term.setCursorPos(3,2)
- print(" ShutDownOS x")
- term.setCursorPos(3,3)
- print(" ReBootOS x")
- term.setCursorPos(3,4)
- print(" x")
- term.setCursorPos(3,5)
- print(" x")
- term.setCursorPos(3,6)
- print(" x")
- term.setCursorPos(3,7)
- print(" x")
- term.setCursorPos(3,8)
- print(" x")
- term.setCursorPos(3,9)
- print(" x")
- end
- while pus==1 do
- local event,button,xPos,yPos=os.pullEvent("mouse_click")
- if xPos>=3 and xPos<=30 and yPos==2 then
- os.shutdown()
- else
- pus=0
- end
- local event,button,xPos,yPos=os.pullEvent("mouse_click")
- if xPos>=3 and xPos<=30 and yPos==3 then
- os.reboot()
- else
- pus=0
- end
- end
- if xPos>=1 and xPos<=10 and yPos<=1 then bar()
- else
- desktop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement