pepeknamornik

Help for menu cmd

Feb 4th, 2020 (edited)
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.99 KB | None | 0 0
  1. local w,h = term.getSize()
  2.  
  3. function prc(text, y)
  4.   local w = term.getSize()
  5.   local _, cy = term.getCursorPos()
  6.   term.setCursorPos(math.ceil((w-#text)/2), y or cy)
  7.   write(text)
  8. end
  9.  
  10. function help()
  11. term.setBackgroundColor(colors.lightGray)
  12. term.clear()
  13. sleep (0.1)
  14. term.setBackgroundColor(colors.gray)
  15. term.clear()
  16. sleep (0.1)
  17. term.setBackgroundColor(colors.white)
  18. term.setTextColor(colors.black)
  19. term.clear()
  20. term.setBackgroundColor(colors.white)
  21. term.setTextColor(colors.black)
  22. term.clear()
  23. term.setBackgroundColor(colors.white)
  24. term.setTextColor(colors.blue)
  25. term.setCursorPos(w/2-5,h-1)
  26. print"  Pepek"
  27. term.setCursorPos(w/2+3,h-1)
  28. print"Soft  "
  29. term.setCursorPos(w/2+2,h-1)
  30. term.setTextColor(colors.lime)
  31. print"@"
  32. term.setTextColor(colors.black)
  33. prc("List of command for Pepdroll Seven", 1)
  34. term.setCursorPos(2,3)
  35. write" - 'cmd' -> Starts a command prompt (CraftOS),"
  36. term.setCursorPos(2,4)
  37. write" - 'opt' -> Starts a Setting App*,"
  38. term.setCursorPos(2,5)
  39. write" - 'reload os' -> Restart Desktop App,"
  40. term.setCursorPos(2,6)
  41. write" - 'oldwin' -> Change color to Windows 98,95,"
  42. term.setCursorPos(2,7)
  43. write" - 'defcol' -> Change to default color,"
  44. term.setCursorPos(2,8)
  45. write" - 'cls list' -> Reset menu to default,"
  46. term.setCursorPos(2,9)
  47. write" - 'pmanager' -> Starts a Pmanager App,"
  48. term.setCursorPos(2,10)
  49. write" - 'version' -> Shows the current version,"
  50. term.setCursorPos(2,11)
  51. write" - 'label' -> Open setting and set Label,"
  52. term.setCursorPos(2,12)
  53. write" - 'update' -> Update desktop App,"
  54. term.setCursorPos(2,13)
  55. write" - 'update -all' -> Update more App,"
  56. term.setCursorPos(2,14)
  57. write" - 'xp mode' -> Change theme to XP mode"
  58. term.setCursorPos(2,15)
  59. write"   (update not support)"
  60. term.setCursorPos(2,17)
  61. write"* Functional after downloading components."
  62.  
  63.  
  64.  
  65. while true do
  66.     local event, button, x, y = os.pullEvent("mouse_click")
  67.     xy = x..","..y
  68.    
  69.         if button == 1 or button == 2 then
  70.         error()
  71.         end
  72. end
  73. end
  74.  
  75.  
  76. help()
Add Comment
Please, Sign In to add comment