Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local terminal = window.new(1,1,term.getSize())
- local current = term.current()
- local terminal = {}
- local bg=colors.black
- local fg=colors.white
- local oSB=terminal.setBackgroundColor
- local oST=terminal.setTextColor
- terminal.setBackgroundColor = function(color)
- -- if term.isColor(color) then
- bg=color
- -- end
- return oSB(color)
- end
- terminal.getBackgroundColor = function()
- return bg
- end
- terminal.setTextColor = function(color)
- -- if term.isColor(color) then
- fg=color
- -- end
- return oST(color)
- end
- terminal.getTextColor = function()
- return fg
- end
- terminal.setBackgroundColour = function(c)
- bg = c
- return oSB(c)
- end
- terminal.getBackgroundColour = function(c)
- return bg
- end
- terminal.setTextColour = function(c)
- fg = c
- return oST(c)
- end
- terminal.getTextColour = function(c)
- return fg
- end
- --terminal.setTextColour = terminal.setTextColor
- --terminal.getTextColour = terminal.getTextColor
- --terminal.setBackgroundColour = terminal.setBackgroundColor
- --terminal.getBackgroundColour = terminal.getBackgroundColor
- setmetatable(terminal,{__index=function(t,k) return current[k] end})
- term.redirect(terminal)
- print(term.setTextColor)
- print(term.setTextColour)
- os.pullEvent()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement