Advertisement
Guest User

colors

a guest
Aug 16th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. local terminal = window.new(1,1,term.getSize())
  2.  
  3. local bg=colors.black
  4.  
  5. local fg=colors.white
  6.  
  7. local oSB=terminal.setBackgroundColor
  8. local oST=terminal.setTextColor
  9. terminal.setBackgroundColor = function(color)
  10. --  if term.isColor(color) then
  11.     bg=color
  12. --  end
  13.   return oSB(color)
  14. end
  15. --terminal.getBackgroundColor = function()
  16. --  return bg
  17. --end
  18. terminal.setTextColor = function(color)
  19. --  if term.isColor(color) then
  20.     fg=color
  21. --  end
  22.   return oST(color)
  23. end
  24. --terminal.getTextColor = function()
  25. --  return fg
  26. --end
  27.  
  28. terminal.setTextColour = terminal.setTextColor
  29. terminal.getTextColour = terminal.getTextColor
  30. terminal.setBackgroundColour = terminal.setBackgroundColor
  31. terminal.getBackgroundColour = terminal.getBackgroundColor
  32. term.redirect(terminal)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement