Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if _CC_VERSION == nil then
- print("Patching term.getTextColor() and term.getBackgroundColor() in due to pre1.74 CC.")
- sleep(0.1)
- oldTermSetTextColor = term.setTextColor
- oldTermSetBackColor = term.setBackgroundColor
- currentTermGetTextColor = colors.white
- currentTermGetBackColor = colors.black
- function term.setTextColor(color)
- oldTermSetTextColor(color)
- currentTermGetTextColor = color
- end
- function term.setBackgroundColor(color)
- oldTermSetBackColor(color)
- currentTermGetBackColor = color
- end
- function term.getTextColor()
- return currentTermGetTextColor
- end
- function term.getBackgroundColor()
- return currentTermGetBackColor
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement