5bitesofcookies

GlassHelp

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