Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wallpaper = paintutils.loadImage("Windows7/wallpaper.nfp")
- paintutils.drawImage(wallpaper, 1, 1)
- taskbar = paintutils.loadImage("Windows7/windows-desktop/taskbar.nfp")
- paintutils.drawImage(taskbar, 1, 18)
- while true do
- term.setTextColour(colours.white)
- term.setBackgroundColour(colours.lightBlue)
- term.setCursorPos(4, 18)
- print("SosOS 1 ComputerCraft Edition by Simon Kjørslevik Thomassen")
- term.setCursorPos(4, 19)
- event, button, xPos, yPos = os.pullEvent("mouse_click")
- if xPos == 1 and yPos == 18 or xPos == 2 and yPos == 18 or xPos == 1 and yPos == 19 or xPos == 2 and yPos == 19 then
- startMenu = paintutils.loadImage("Windows7/windows-desktop/startMenu.nfp")
- paintutils.drawImage(startMenu, 1, 3)
- term.setCursorPos(1, 6)
- term.setTextColour(colours.black)
- print("> Apps")
- print("> File expl.")
- print("> Edit theme")
- term.setCursorPos(1, 16)
- print("> Close menu")
- print("> Shutdown")
- eventS, buttonS, xPosS, yPosS = os.pullEvent("mouse_click")
- if xPosS == 1 and yPosS == 6 then
- fsWin = paintutils.loadImage("Windows7/windows-desktop/appsWindow.nfp")
- paintutils.drawImage(fsWin, 1, 1)
- term.setCursorPos(1, 1)
- term.setTextColour(colours.black)
- term.setBackgroundColour(colours.lightBlue)
- print("Apps browser")
- term.setTextColour(colours.black)
- term.setBackgroundColour(colours.white)
- term.setCursorPos(1, 2)
- shell.run("programs")
- term.setCursorPos(1, 12)
- print("Run: ")
- term.setCursorPos(6, 12)
- run, arg1, arg2, arg3, arg4 = read(), read(), read(), read(), read()
- term.setCursorPos(1, 17)
- print("To exit the program, just wait 3 seconds after the code.")
- term.clear()
- term.setCursorPos(1, 1)
- shell.run(run, arg1, arg2, arg3, arg4)
- sleep(3)
- shell.run("cd", "SosOS-desktop")
- shell.run("main")
- shell.run("cd", "..")
- elseif xPosS == 1 and yPosS == 7 then
- fsWin = paintutils.loadImage("Windows7/windows-desktop/appsWindow.nfp")
- paintutils.drawImage(fsWin, 1, 1)
- term.setTextColour(colours.black)
- term.setBackgroundColour(colours.lightBlue)
- term.setCursorPos(1, 1)
- print("File browser [not working, type !exit]")
- term.setBackgroundColour(colours.white)
- term.setTextColour(colours.black)
- repeat
- exitCode = 0
- term.setCursorPos(1, 2)
- shell.run("ls")
- term.setCursorPos(1, 16)
- print("Type !exit to quit. To run apps, use App browser.")
- term.setCursorPos(1, 17)
- print("Goto: ")
- term.setCursorPos(7, 17)
- goto = read()
- if goto == "!exit" then
- shell.run("windows-desktop/main")
- else
- term.setCursorPos(1, 2)
- shell.run("cd", goto)
- end
- until exitCode == 256
- elseif xPosS == 1 and yPosS == 8 then
- shell.run("cd", "..")
- shell.run("npaintpro", "wallpaper.nfp")
- shell.run("windows-logon")
- elseif xPosS == 1 and yPosS == 17 then
- os.shutdown()
- else
- shell.run("cd", "SosOS-desktop")
- shell.run("main")
- shell.run("cd", "..")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement