Advertisement
Guest User

startup

a guest
Sep 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1.  
  2. local monitor = peripheral.wrap("back")
  3. monitor.clear()
  4. local function setup()
  5. monitor.setTextColor(colors.black)
  6. monitor.setBackgroundColor(colors.red)
  7. monitor.setTextScale(5)
  8. end
  9. --Wasted Lines
  10. --local function CenterText()
  11. --local w,h = monitor.getSize()
  12. --monitor,setCursorPos(math.floor(w / 2 - text:len() / 2 + .5), math.floor(h / 2+ .5))
  13. local function centerTextXY(text)
  14. local w, h = monitor.getSize()
  15. monitor.setCursorPos(math.floor(w / 2  - text:len() / 2 + 1.75), math.floor(h / 2 ))
  16. monitor.write(text)
  17. end
  18. setup()
  19. centerTextXY("B1/F")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement