Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --variables
- version = 4
- running = true
- _dt = paintutils.loadImage("dt")
- _ms = 0
- --functions
- clear = function()
- term.clear()
- term.setCursorPos(1,1)
- end
- pr = function()
- term.setCursorPos(1,10)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[notepad]")
- end
- drawDeskTop = function()
- term.setBackgroundColor(colors.blue)
- clear()
- paintutils.drawImage(_dt, 1, 1)
- end
- drawMenu = function()
- term.setCursorPos(1,2)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.red)
- print("[afsluiten]")
- end
- drawMenu2 = function()
- term.setCursorPos(1,3)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[cmd]")
- end
- drawMenu3 = function()
- term.setCursorPos(1,4)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[chat]")
- end
- music = function()
- term.setCursorPos(1,6)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[muziek]")
- end
- drawMenu4 = function()
- term.setCursorPos(1,7)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[instellingen]")
- end
- instellingen = function()
- term.setCursorPos(1,8)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[software update]")
- end
- drawTaskBar = function()
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.blue)
- term.clearLine()
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.lime)
- term.setTextColor(colors.white)
- term.write("[menu]")
- end
- menuS = function()
- term.setCursorPos(1,5)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.red)
- print("[menu sluiten]")
- end
- ect = function()
- term.setCursorPos(1,9)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.lime)
- print("[achtergrond]")
- end
- stop = function()
- clear()
- running = false
- os.shutdown()
- 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
- drawMenu()
- drawMenu2()
- drawMenu3()
- drawMenu4()
- menuS()
- music()
- _ms = 1
- elseif _ms == 1 and button == 1 and y == 2 and x < 7 then
- clear()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.blue)
- term.setCursorPos(5,5)
- print("afsluiten")
- sleep(5)
- stop()
- elseif _ms == 1 and button == 1 and y == 3 and x < 7 then
- term.setCursorPos(1,1)
- term.clear()
- running = false
- shell.run("cmd")
- elseif _ms == 1 and button == 1 and y == 4 and x < 7 then
- running = false
- print("welkom bij de shatroom typ hier je naam")
- id = read()
- print("welkom")
- print(id)
- print("als je weer terug wild typ dat eerst /logout")
- print("en dan reboot")
- sleep(7)
- shell.run("chat join chatroom gebruiker")
- elseif _ms == 1 and button == 1 and y == 7 and x < 12 then
- instellingen()
- ect()
- pr()
- elseif _ms == 1 and button == 1 and y == 8 and x < 7 then
- running = false
- clear()
- sleep(1)
- shell.run("disk/newapps")
- os.reboot()
- elseif _ms == 1 and button == 1 and y == 5 and x < 7 then
- shell.run("gui")
- elseif _ms == 1 and button == 1 and y == 9 and x < 7 then
- shell.run("paint dt")
- sleep(1)
- shell.run("gui")
- elseif _ms == 1 and button == 1 and y == 6 and x < 7 then
- shell.run("dj play left")
- sleep(1)
- shell.run("gui")
- elseif _ms == 1 and button == 1 and y == 10 and x < 7 then
- print("notepad starten")
- textutils.slowPrint("als je een printer hebt kan je alles printen")
- sleep(5)
- shell.run("edit notepad")
- shell.run("gui")
- end
- end
- end
- init = function()
- drawDeskTop()
- drawTaskBar()
- runtime()
- end
- --mainstuff
- init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement