Advertisement
AquaJD

[AOS] About

Jan 29th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.21 KB | None | 0 0
  1. --[[
  2.  
  3.   AquaOS v1.51 - by AutoLocK and SSS
  4.   Copyright 2013
  5.  
  6.   This is the About Screen!
  7.  
  8.   REQUIREMENTS:
  9.   - HTTP API needs to be enabled
  10.   - Computer Width = 51
  11.   - Computer Height = 19
  12.  
  13. --]]
  14.  
  15. version = "1.51"
  16.  
  17. os.loadAPI("/AquaOS/Resources/APIs/QuickTils")
  18. os.loadAPI("/AquaOS/Resources/APIs/Settings")
  19.  
  20. configFile = Settings.openSettingsFile(configPath)
  21. bGPic = configFile.getSectionedValue("Appearance","bGPic")
  22. iCon1Text = configFile.getSectionedValue("Appearance","iCon1Text")
  23. iCon1Pic = configFile.getSectionedValue("Appearance","iCon1Pic")
  24. iCon1Link= configFile.getSectionedValue("Appearance","iCon1Link")
  25. iCon2Text = configFile.getSectionedValue("Appearance","iCon2Text")
  26. iCon2Pic = configFile.getSectionedValue("Appearance","iCon2Pic")
  27. iCon2Link = configFile.getSectionedValue("Appearance","iCon2Link")
  28. tBarCol = configFile.getSectionedValue("Appearance","tBarCol")
  29. tBarTextCol = configFile.getSectionedValue("Appearance","tBarTextCol")
  30. backColor = configFile.getSectionedValue("Appearance","backColor")
  31. textColor = configFile.getSectionedValue("Appearance","textColor")
  32. adminUser = configFile.getSectionedValue("Accounts","adminUser")
  33. adminPass = configFile.getSectionedValue("Accounts","adminPass")
  34. basicUser1 = configFile.getSectionedValue("Accounts","basicUser1")
  35. basicPass1 = configFile.getSectionedValue("Accounts","basicPass1")
  36. basicUser2 = configFile.getSectionedValue("Accounts","basicUser2")
  37. basicPass2 = configFile.getSectionedValue("Accounts","basicPass2")
  38. basicPass3 = configFile.getSectionedValue("Accounts","basicUser3")
  39. basicPass3 = configFile.getSectionedValue("Accounts","basicPass3")
  40. loginPass = configFile.getSectionedValue("Other","loginPass")
  41. showIcons = configFile.getSectionedValue("Other","showIcons")
  42. currentTheme = configFile.getSectionedValue("Other","currentTheme")
  43. currentUser = configFile.getSectionedValue("Other","currentUser")
  44. tBarCol = tonumber(tBarCol)
  45. tBarTextCol = tonumber(tBarTextCol)
  46. backColor = tonumber(backColor)
  47. textColor = tonumber(textColor)
  48. loginPass = tonumber(loginPass)
  49.  
  50.  
  51. function titleBar()
  52.   QuickTils.cursor(1,1)
  53.   QuickTils.bColor(tBarCol)
  54.   QuickTils.color(tBarTextCol)
  55.   term.clearLine()
  56.   QuickTils.cursor(1,1)
  57.   QuickTils.printCentered("About AquaOS")
  58. end
  59.  
  60. function mainScreen()
  61.   local running = true
  62.   while running do
  63.     QuickTils.bColor(backColor)
  64.     QuickTils.cursor(1,4)
  65.     QuickTils.color(tBarCol)
  66.     QuickTils.printCentered("Welcome to AquaOS!")
  67.     QuickTils.color(textColor)
  68.     QuickTils.printCentered("An OS made with QuickTils!")
  69.     QuickTils.cursor(1,7)
  70.     QuickTils.printCentered("Thanks to NDFJay")
  71.     QuickTils.printCentered("for his excellent design!")
  72.     QuickTils.cursor(2,11)
  73.     print("Version:  "..version)
  74.     QuickTils.cursor(2,12)
  75.     print("User:     "..string.upper(currentUser))
  76.     QuickTils.cursor(2,13)
  77.     print("Theme:    "..string.upper(currentTheme))
  78.     QuickTils.cursor(16,18)
  79.     print("Press 'Enter' to exit!")
  80.     titleBar()
  81.     local event,key = os.pullEvent()
  82.     if event == "key" then
  83.       if key == keys.enter then
  84.         return
  85.         shell.run("/AquaOS/.Boot/Main")
  86.       end
  87.     end
  88.   end
  89. end
  90.  
  91. QuickTils.bColor(backColor)
  92. QuickTils.clean(1,1)
  93. mainScreen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement