Advertisement
Guest User

monitors

a guest
Jul 17th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. fl1 = peripheral.wrap("monitor_1")
  2. fl2 = peripheral.wrap("monitor_2")
  3.  
  4. fl1.clear()
  5. fl2.clear()
  6.  
  7. function writeText(mon, scale, text, yVal)
  8.   w, m = mon.getSize()
  9.   length = string.len(text)
  10.   minus = math.floor(w-length)
  11.   x = math.floor(minus/2)
  12.   mon.setCursorPos(x+1, yVal)
  13.   mon.setTextScale(scale)
  14.   mon.write(text)
  15. end
  16.  
  17. writeText(fl1,2,"FLOOR",1)
  18. writeText(fl1,2,"001",2)
  19. writeText(fl2,2,"FLOOR",1)
  20. writeText(fl2,2,"002",2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement