5bitesofcookies

CCGlass HelpV0.3.3

Oct 19th, 2013
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. bigClear()
  2. local function main()
  3. while true do
  4. clearAll()
  5. page = 0
  6. tinyPrint("Hello! Welcome to Help!",1,glcolors.otherBlue)
  7. tinyPrint("To get back to this screen,",2,glcolors.otherBlue)
  8. tinyPrint("just call $$back. To go to the",3,glcolors.otherBlue)
  9. tinyPrint("next page, use $$> and $$<.",4,glcolors.otherBlue)
  10. tinyPrint("To exit the app, do $$exit",5,glcolors.otherBlue)
  11. local evt, cmd = os.pullEvent("chat_command")
  12. cmd = string.lower(cmd)
  13. if cmd == "exit" then
  14. error("Quit help.")
  15. elseif cmd == "apps" then
  16. appLaun()
  17. elseif cmd == "version" then
  18. version()
  19. elseif cmd == "index" then
  20. helpIndex()
  21. elseif cmd == "commands" then
  22. commands()
  23. end
  24. end
  25. end
  26. function cmd(max)
  27.  
  28. while true do
  29. max = max+1
  30. local evt, cmd = os.pullEvent("chat_command")
  31. cmd = string.lower(cmd)
  32. if cmd == "exit" then
  33. error()
  34. elseif cmd == "back" then
  35. return
  36. elseif cmd == ">" and page < max then
  37. page = page +1
  38. elseif cmd == "<" and page > -1 then
  39. page = page -1
  40. end
  41. end
  42. end
  43. function appLaun()
  44. tinyClear()
  45. tinyPrint("To launch an app, simply ",1,glcolors.otherBlue)
  46. tinyPrint("do $$apps at the homescreen",2,glcolors.otherBlue)
  47. tinyPrint("then do $$appname. To list ",3,glcolors.otherBlue)
  48. tinyPrint("apps do $$list at the luancher",4,glcolors.otherBlue)
  49. cmd(0)
  50. end
  51.  
  52.  
  53.  
  54.  
  55. function helpIndex()
  56. tinyClear()
  57. tinyPrint("apps, index, version,",1,glcolors.otherBlue)
  58. tinyPrint("commands",2,glcolors.otherBlue)
  59. cmd(0)
  60. end
  61.  
  62. function version()
  63. tinyClear()
  64. tinyPrint("You're running Glass V"..glassVersion.."!",1,glcolors.otherBlue)
  65. cmd(0)
  66. end
  67. function commands()
  68. clearAll()
  69. tinyPrint("Commands are:",1,glcolors.red)
  70. mPrint("options, help, sleep, reboot, shutdown, apps, ping, crash",3,glcolors.otherBlue)
  71. cmd(0)
  72. end
  73. main()
Advertisement
Add Comment
Please, Sign In to add comment