Advertisement
fishermedders

/bin/util/fishutils

Nov 11th, 2016
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. -- FishUtils by Fisher (XMedders)!
  2. -- fishermedders.com 2016
  3.  
  4. function cprint( y, text )
  5. size = { term.getSize() }
  6. term.setCursorPos( (size[1]/2)-(#text/2)+1, y)
  7. term.write(text)
  8. end
  9.  
  10. function label( text, bcolor, tcolor )
  11. size = { term.getSize() }
  12. term.setCursorPos(1,1)
  13. term.setBackgroundColor(bcolor)
  14. for i = 1,size[1] do
  15. term.write(" ")
  16. end
  17. term.setCursorPos(1,size[2])
  18. for i = 1,size[1] do
  19. term.write(" ")
  20. end
  21. term.setTextColor( tcolor )
  22. cprint( 1, text )
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement