Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version = 1.0
- running = true
- _ms = 0
- _dt = paintutils.loadImage("/OS/.backgrounds/dt")
- clear = function()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1, 1)
- end
- drawMenu1()
- term.setCursorPos(1, 2)
- term.setBackgroundColor( colors.cyan )
- term.setTextColor( colors.black )
- print( "[POWER]" )
- end
- drawTaskBar = function()
- term.setCursorPos(1, 1)
- term.setBackgroundColor( colors.blue )
- term.clearLine()
- term.setCursorPos(1, 1)
- term.setBackgroundColor( colors.red )
- term.setTextColor( colors.black )
- term.write("[PROGS.]")
- end
- drawDeskTop = function()
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- term.setCursorPos(1, 1)
- paintutils.drawImage(_dt, 1, 1)
- end
- stop = function()
- clear()
- running = false
- term.setTextColor( colors.blue )
- print("Thanks for using NXOS")
- end
- runTime = function()
- while running do
- event, button, x, y = OS.pullEvent("mouse_click")
- if _ms == 0 and button == 1 and x < 7 and y == 1 then
- drawMenu1()
- elseif _ms == 1 and button == 1 and y == 1 and x < 7 then
- stop()
- end
- end
- end
- init = function()
- drawDeskTop()
- drawTaskBar()
- runTime()
- end
- init()
Advertisement
Add Comment
Please, Sign In to add comment