Advertisement
Sparta252

Untitled

Mar 22nd, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. m = peripheral.wrap("right")
  2.  
  3. m.setTextScale(1.5)
  4.  
  5.  
  6. w, h = term.getSize()
  7.  
  8. repeat
  9. m.setBackgroundColor(colors.lightGray)
  10. m.clear()
  11. m.setTextColor(colors.blue)
  12. for y=1, h do
  13.  for x=1, w do
  14.   m.setCursorPos(x, y)
  15.   m.write("=")
  16.  end
  17. end
  18.  if tX and tY then
  19.  m.setBackgroundColor(colors.lightBlue)
  20.  m.setTextColor(colors.white)
  21.  m.setCursorPos(tX, tY)
  22.  m.write("=")
  23.  end
  24.  
  25. event, side, tX, tY = os.pullEvent("monitor_touch")
  26.  
  27.  m.setBackgroundColor(colors.lightBlue)
  28.  m.setTextColor(colors.white)
  29.  
  30.  m.setCursorPos(tX, tY)
  31.  m.write("=")
  32.  
  33. sleep(0)
  34. until nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement