Advertisement
TyanColte

apteset2

Jan 9th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. m = peripheral.wrap("right")
  2.  
  3. slc = 0
  4. tBarC = 8
  5. tBartC = 1
  6. backColor = 1
  7.  
  8. function titlebar()
  9.   term.setCursorPos(1,1)
  10.   term.setBackgroundColor(tBarC)
  11.   term.setTextColor(tBartC)
  12.   term.clearLine()
  13.   term.setCursorPos(3,1)
  14.   print("[Select which apiary]")
  15.   term.setCursorPos(39,19)
  16.   print("[Start]")
  17. end
  18.  
  19. function background()
  20.   term.setBackgroundColor(backColor)
  21.   term.clear()
  22.   bground = paintutils.loadImage(".gui")
  23.   paintutils.drawImage(bground,1,1)
  24. end
  25.  
  26. function one()
  27.   term.clear()
  28.   term.setCursorPos(1,1)
  29.   term.setBackgroundColor(32768)
  30.   print("apairy 1")
  31. end
  32.  
  33. function two()
  34.   term.clear()
  35.   term.setCursorPos(1,1)
  36.   term.setBackgroundColor(32768)
  37.   print("apairy 2")
  38.   end
  39.  
  40. function three()
  41.   term.clear()
  42.   term.setCursorPos(1,1)
  43.   term.setBackgroundColor(32768)
  44.   print("apairy 3")
  45.   end
  46.  
  47. function four()
  48.   term.clear()
  49.   term.setCursorPos(1,1)
  50.   term.setBackgroundColor(32768)
  51.   print("apairy 4")
  52.   end
  53.  
  54. function five()
  55.   term.clear()
  56.   term.setCursorPos(1,1)
  57.   term.setBackgroundColor(32768)
  58.   print("apairy 5")
  59.   end
  60.  
  61. function six()
  62.   term.clear()
  63.   term.setCursorPos(1,1)
  64.   term.setBackgroundColor(32768)
  65.   print("apairy 6")
  66. end
  67.  
  68. function seven()
  69.   term.clear()
  70.   term.setCursorPos(1,1)
  71.   term.setBackgroundColor(32768)
  72.   print("apairy 7")
  73. end
  74.  
  75. function eight()
  76.   term.clear()
  77.   term.setCursorPos(1,1)
  78.   term.setBackgroundColor(32768)
  79.   print("apairy 8")
  80. end
  81.  
  82. function nine()
  83.   term.clear()
  84.   term.setCursorPos(1,1)
  85.   term.setBackgroundColor(32768)
  86.   print("apairy 9")
  87. end  
  88.  
  89. function ten()
  90.   term.clear()
  91.   term.setCursorPos(1,1)
  92.   term.setBackgroundColor(32768)
  93.   print("apairy 3")
  94. end
  95.  
  96. background()
  97. -- print(table.concat({os.pullEventRaw()}, ","))
  98.  
  99. while true do
  100. event, X, Y = os.pullEvent("mouse_click")
  101.  
  102. X = tonumber(X)
  103. Y = tonumber(Y)
  104.  
  105.   if X == 5 and Y == 3 then
  106.     one()
  107.     elseif X == 9 and Y == 3 then
  108.     two()
  109.     elseif X == 13 and Y == 3 then
  110.     three()
  111.     elseif X == 17 and Y == 3 then
  112.     four()
  113.     elseif X == 21 and Y == 3 then
  114.     five()
  115.     elseif X == 25 and  Y == 3 then
  116.     six()
  117.     elseif X == 29 and Y == 3 then
  118.     seven()
  119.     elseif X == 33 and Y == 3 then
  120.     eight()
  121.     elseif X == 37 and Y == 3 then
  122.     nine()
  123.     elseif X == 41 and Y == 3 then
  124.     ten()
  125.     else
  126.     print(X..", "..Y)
  127.    
  128.   end
  129. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement