Advertisement
natie3

Interface

Sep 28th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.21 KB | None | 0 0
  1. xmax, ymax = term.getSize()
  2. term.clear()
  3. args = {...}
  4. anders = false
  5. if args[1] == "anders" then
  6.   anders = true
  7. end
  8.  
  9. for x = 1, xmax do
  10.   for y = 1, ymax do
  11.     term.setCursorPos(x,y)
  12.     if (x == 1 or x == xmax) and ( y == 1 or y == 9) then
  13.       term.setBackgroundColor(colors.blue)
  14.       term.setTextColor(colors.green)
  15.       if anders then
  16.         term.write("+")
  17.       else
  18.         term.write(" ")
  19.       end
  20.     elseif (y == 1 or y == 9) then
  21.       term.setBackgroundColor(colors.blue)
  22.       term.setTextColor(colors.lime)
  23.       if anders then
  24.         term.write("-")
  25.       else
  26.         term.write(" ")
  27.       end
  28.     elseif (x == 1 or x == xmax) and (y > 1 and y < 9) then
  29.       term.setBackgroundColor(colors.blue)
  30.       term.setTextColor(colors.lime)
  31.       if anders then
  32.         term.write("|")
  33.       else
  34.         term.write(" ")
  35.       end
  36.     elseif (x == 1 or x == xmax) then
  37.       term.setBackgroundColor(colors.blue)
  38.       term.setTextColor(colors.black)
  39.       if anders then
  40.         term.write("#")
  41.       else
  42.         term.write(" ")
  43.       end
  44.     elseif (y == 10 or y == ymax) then
  45.       term.setBackgroundColor(colors.blue)
  46.       term.setTextColor(colors.black)
  47.       if anders then
  48.         term.write("=")
  49.       else
  50.         term.write(" ")
  51.       end
  52.     else
  53.       if y < 10 then
  54.         term.setBackgroundColor(colors.cyan)
  55.       else
  56.         term.setBackgroundColor(colors.black)
  57.       end
  58.       term.write(" ")
  59.     end
  60.   end
  61. end
  62. term.setBackgroundColor(colors.lightBlue)
  63. term.setTextColor(colors.green)
  64. term.setCursorPos(6,3)
  65. term.write(" Random button1 ")
  66. term.setCursorPos(6,5)
  67. term.write(" Random button2 ")
  68. term.setCursorPos(6,7)
  69. term.write(" Random button3 ")
  70. term.setBackgroundColor(colors.black)
  71. term.setTextColor(colors.white)
  72. term.setCursorPos(3,12)
  73. term.write("Once upon a time I ate")
  74. term.setCursorPos(3,13)
  75. term.write("your cavia this mornin")
  76. term.setCursorPos(3,14)
  77. term.write("Once upon a time I ate")
  78. term.setCursorPos(3,15)
  79. term.write("your cavia this mornin")
  80. term.setCursorPos(3,16)
  81. term.write("Once upon a time I ate")
  82. term.setCursorPos(3,17)
  83. term.write("your cavia this mornin")
  84. os.pullEvent("key")
  85. term.clear()
  86. term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement