Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- log(" ")
- log(" ")
- log("Settings App Started")
- log(" ")
- log(" ")
- function s(...) return sleep(...) end
- function w(...) return write(...) end
- function p(...) return print(...) end
- function tw(...) return term.write(...) end
- function scp(...) return term.setCursorPos(...) end
- function sbc(...) return term.setBackgroundColor(...) end
- function stc(...) return term.setTextColor(...) end
- function tc(...) return term.clear(...) end
- function tcl(...) return term.clearLine() end
- function scb(...) return term.setCursorBlink(...) end
- function ts(...) return term.scroll(...) end
- function r(...) return shell.run(...) end
- function para(...) return parallel.waitForAny(...) end
- function sw(...) return textutils.slowWrite(...) end
- function sp(...) return textutils.slowPrint(...) end
- if skip == nil then
- log("==> Adding taskbar")
- taskbar.setVisible(true)
- log("==> Creating app window")
- Settingswindow = window.create(term.current(),1,2,51,18)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- logo = paintutils.loadImage("OS/Programs/Settings/Settings.png")
- paintutils.drawImage(logo, 1, 1 )
- Settingswindow.setCursorPos(20,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- if admin == "true" then
- else
- adminpopup = window.create(term.current(),12,7,25,10)
- adminpopup.setBackgroundColor(colors.white)
- adminpopup.clear()
- adminpopup.setCursorPos(1,1)
- adminpopup.setBackgroundColor(colors.red)
- adminpopup.setTextColor(colors.black)
- adminpopup.write(" Admin Login ")
- adminpopup.setTextColor(colors.purple)
- adminpopup.setCursorPos(2,2)
- adminpopup.setBackgroundColor(colors.white)
- adminpopup.setTextColor(colors.black)
- adminpopup.write("Please login as a admin.")
- adminpopup.setCursorPos(2,3)
- adminpopup.write("To access \"Settings\"")
- adminpopup.setCursorPos(2,5)
- adminpopup.write("Username:")
- adminpopup.setCursorPos(2,6)
- adminpopup.setBackgroundColor(colors.lightGray)
- adminpopup.write(" ")
- adminpopup.setCursorPos(2,8)
- adminpopup.setBackgroundColor(colors.white)
- adminpopup.write("Password:")
- adminpopup.setCursorPos(2,9)
- adminpopup.setBackgroundColor(colors.lightGray)
- adminpopup.write(" ")
- while true do
- scp(13,12)
- sbc(colors.lightGray)
- username = read()
- scp(13,15)
- sbc(colors.lightGray)
- password = read("*")
- checkUser()
- if username == UserInfo[1][1] and password == UserInfo[1][2] and admin1 == "true" or username == UserInfo[2][1] and password == UserInfo[2][2] and admin2 == "true" or username == UserInfo[3][1] and password == UserInfo[3][2] and admin3 == "true" or username == UserInfo[4][1] and password == UserInfo[4][2] and admin4 == "true" then
- Settingswindow.clear()
- paintutils.drawImage(logo, 1, 1 )
- Settingswindow.setCursorPos(20,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- break
- else
- shell.run('OS/desktop.lua')
- end
- end
- end
- sleep(4)
- log("==> Prossecing animation")
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 5, 1 )
- Settingswindow.setCursorPos(25,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 10, 1 )
- Settingswindow.setCursorPos(30,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 15, 1 )
- Settingswindow.setCursorPos(35,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 20, 1 )
- Settingswindow.setCursorPos(40,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 25, 1 )
- Settingswindow.setCursorPos(45,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 30, 1 )
- Settingswindow.setCursorPos(50,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 32, 1 )
- Settingswindow.setCursorPos(51,15)
- Settingswindow.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.write("Settings")
- sleep(0.1)
- Settingswindow.setBackgroundColor(colors.purple)
- Settingswindow.clear()
- paintutils.drawImage(logo, 35, 1 )
- sleep(1)
- taskbar.setBackgroundColor(colors.lightGray )
- taskbar.clear()
- taskbar.setCursorPos(1,1)
- log("==> Settings Started!")
- else
- skip = nil
- end
- taskbar.setBackgroundColor( colors.lightGray )
- taskbar.clear()
- taskbar.setCursorPos(1,1)
- taskbar.write(" Settings")
- taskbar.setCursorPos(49,1)
- taskbar.setTextColor(colors.red)
- taskbar.write("#")
- taskbar.setTextColor(colors.white)
- Settingswindow.setBackgroundColor(colors.white)
- Settingswindow.clear()
- profileicon = paintutils.loadImage("OS/Programs/Settings/profile.png")
- paintutils.drawImage(profileicon, 2, 4 )
- Settingswindow.setCursorPos(2,4)
- Settingswindow.setBackgroundColor(colors.red)
- Settingswindow.write(" Profile ")
- profileicon = paintutils.loadImage("OS/Programs/Settings/profile.png")
- paintutils.drawImage(profileicon, 13, 4 )
- Settingswindow.setCursorPos(13,4)
- Settingswindow.setBackgroundColor(colors.red)
- Settingswindow.write(" Domain ")
- while true do
- local event, button, x, y = os.pullEvent("mouse_click")
- if x >= 2 and x <= 10 and y >= 4 and y <= 6 then
- shell.run('OS/programs/settings/profile.lua')
- elseif x >= 13 and x <= 21 and y >= 4 and y <= 6 then
- shell.run('OS/programs/settings/domain.lua')
- elseif x == 49 and y == 1 then
- shell.run('OS/desktop.lua')
- end
- end
- sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement