Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---TimeOS kernel [OS_KRNL]
- ---It's used for almost all TimeOS functions,Greatly reducing the OS line count because the OS files don't need to store function ---data
- os.loadAPI ("APIs/fLib")
- user = fLib.getLine ("conf", 1)
- -----[GUI Functions]
- function titleBar()
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clearLine()
- term.setCursorPos(1, 1)
- print("RevengeOS")
- term.setCursorPos(20,1)
- print ("Welcome,"..user)
- end
- function titleBarAbout()
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clearLine()
- term.setCursorPos(1, 1)
- print("TimeOS")
- term.setBackgroundColor (colors.lightGray)
- term.setCursorPos (10,1)
- print ("Desktop X")
- term.setCursorPos (21,1)
- term.setBackgroundColor (colors.gray)
- print ("About TimeOS X")
- term.setBackgroundColor (colors.white)
- end
- os.loadAPI ("APIs/fLib")
- name1 = fLib.getLine ("desktop.cfg", 2)
- name2 = fLib.getLine ("desktop.cfg", 4)
- name3 = fLib.getLine ("desktop.cfg", 6)
- name4 = fLib.getLine ("desktop.cfg", 8)
- name5 = fLib.getLine ("desktop.cfg", 10)
- name6 = fLib.getLine ("desktop.cfg", 12)
- name7 = fLib.getLine ("desktop.cfg", 14)
- name8 = fLib.getLine ("desktop.cfg", 16)
- name9 = fLib.getLine ("desktop.cfg", 18)
- name10 = fLib.getLine ("desktop.cfg", 20)
- name11 = fLib.getLine ("desktop.cfg", 22)
- name12 = fLib.getLine ("desktop.cfg", 24)
- name13 = fLib.getLine ("desktop.cfg", 26)
- name14 = fLib.getLine ("desktop.cfg", 28)
- name15 = fLib.getLine ("desktop.cfg", 30)
- function drawDesktop()
- term.clear()
- term.setBackgroundColor(colors.cyan)
- term.setTextColor(colors.black)
- term.clear()
- titleBar()
- term.setBackgroundColor (colors.cyan)
- term.setCursorPos (3,3)
- print (""..name1)
- term.setCursorPos (12,3)
- term.setBackgroundColor (colors.cyan)
- print (""..name2)
- term.setCursorPos (21,3)
- print (""..name3)
- term.setCursorPos (3,6)
- term.setBackgroundColor (colors.cyan)
- print (""..name4)
- term.setCursorPos (12,6)
- print (""..name5)
- term.setCursorPos (21,6)
- term.setBackgroundColor (colors.cyan)
- print (""..name6)
- term.setCursorPos (3,9)
- print (""..name7)
- term.setCursorPos (12,9)
- term.setBackgroundColor (colors.cyan)
- print (""..name8)
- term.setCursorPos (21,9)
- print (""..name9)
- term.setCursorPos (3,12)
- term.setBackgroundColor (colors.cyan)
- print (""..name10)
- term.setCursorPos (12,12)
- print (""..name11)
- term.setCursorPos (21,12)
- term.setBackgroundColor (colors.cyan)
- print (""..name12)
- term.setCursorPos (3,15)
- print (""..name13)
- term.setCursorPos (12,15)
- term.setBackgroundColor (colors.cyan)
- print (""..name14)
- term.setCursorPos (21,15)
- print (""..name15)
- end
- function about()
- term.setBackgroundColor (colors.white)
- term.setTextColor (colors.black)
- term.clear()
- titleBar()
- term.setCursorPos (3,3)
- print ("TimeOS Alpha 3.00")
- term.setCursorPos (3,4)
- print ("by Time.")
- term.setCursorPos (2,6)
- print ("Credits:")
- term.setCursorPos (3,7)
- print ("GravityScore's LuaIDE,inventor2514's GUI File Browser.")
- term.setCursorPos (2,12)
- print ("Disk Space:")
- term.setCursorPos (3, 13)
- print (fs.getFreeSpace("/"))
- term.setCursorPos (14,13)
- print ("Bytes free")
- end
- function drawMenu1()
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(1,2)
- print(" ")
- term.setCursorPos (1,5)
- print("Sleep ")
- term.setCursorPos (1,3)
- print("Desktop ")
- term.setCursorPos(1,4)
- print("About TimeOS ")
- term.setCursorPos(1,6)
- print("-----------------")
- term.setCursorPos(1,7)
- print("Update TimeOS ")
- term.setCursorPos(1,8)
- print("-----------------")
- term.setCursorPos(1,9)
- print("Reboot ")
- term.setCursorPos(1,10)
- print("Shutdown ")
- term.setCursorPos(1,11)
- print(" ")
- end
- function drawLoginBox()
- term.setCursorBlink (false)
- term.clear()
- term.setTextColor (colors.blue)
- term.setBackgroundColor (colors.gray)
- term.setCursorPos (12,5)
- print("TimeOS Login ")
- term.setCursorPos (33,5)
- term.setBackgroundColor (colors.lightGray)
- print ("X")
- term.setBackgroundColor (colors.white)
- term.setCursorPos (12,6)
- print (" ")
- term.setCursorPos (12,8)
- print (" ")
- term.setCursorPos (12,10)
- print (" ")
- term.setCursorPos (12,7)
- print ("User: ")
- term.setCursorPos (12,9)
- print ("Pass: ")
- term.setCursorPos (33,7)
- print (" ")
- term.setCursorPos (33,9)
- print (" ")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement