xXm0dzXx

Pastebin

Nov 4th, 2012
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. local x,y = term.getSize()
  2.  
  3. function drawPage()
  4. term.setBackgroundColour( colors.white )
  5. term.setTextColour( colors.black )
  6. term.clear()
  7. local troll = 1
  8. for i=4,y do
  9. if troll == 1 then
  10. for iz=1,x do
  11. paintutils.drawPixel(iz,i,colors.blue)
  12. end
  13. troll = false
  14. else
  15. if troll == 2 then
  16. troll = 1
  17. else
  18. troll = 2
  19. end
  20. end
  21. end
  22. term.setCursorPos(2,2)
  23. term.setBackgroundColour( colors.white )
  24. write("O")
  25. for i=1,y do
  26. paintutils.drawPixel(4,i,colors.red)
  27. end
  28.  
  29. term.setBackgroundColour( colors.white )
  30. term.setTextColour( colors.black )
  31. term.setCursorPos(5,3)
  32. end
  33.  
  34. local function cPrint(text)
  35. x2,y2 = term.getCursorPos()
  36. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  37. write(text.. "\n")
  38. end
  39.  
  40. drawPage()
  41. write("Pastebin")
  42.  
  43. term.setCursorPos(1,6)
  44. cPrint("User Panel")
  45. term.setCursorPos(1,8)
  46. cPrint("Not Logged In")
  47. term.setCursorPos(1,9)
  48. cPrint("[ Login ]")
  49.  
  50. repeat
  51. local event, key = os.pullEvent("key")
  52. until key == keys.enter
  53.  
  54. drawPage()
  55. write("Pastebin")
  56.  
  57. term.setCursorPos(1,6)
  58. cPrint("User Panel")
  59. term.setCursorPos(1,8)
  60. cPrint("Enter DEV Key:")
  61. term.setCursorPos(5,9)
  62. local devKey = read()
  63. local selection = 1
  64.  
  65. while true do
  66. drawPage()
  67. write("Main Menu")
  68.  
  69. term.setCursorPos(1,6)
  70. if selection == 1 then
  71. cPrint("[ Trending ]")
  72. else
  73. cPrint("Trending")
  74. end
  75.  
  76. term.setCursorPos(1,7)
  77. if selection == 2 then
  78. cPrint("[ Pastes ]")
  79. else
  80. cPrint("Pastes")
  81. end
  82.  
  83. local event, key = os.pullEvent("key")
  84. if key == keys.up then
  85. selection = 1
  86. elseif key == keys.down
  87. selection = 2
  88. end
  89. end
Advertisement
Add Comment
Please, Sign In to add comment