nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.97k stars 188 forks source link

Allow the use of default colors #10

Closed dcampbell24 closed 12 years ago

dcampbell24 commented 12 years ago

When clear is called it sets the background to black and foreground to white, but these colors may not be the default foreground and background colors. Also, when drawing to the screen, there does not seem to be an option to use the default foreground and background colors. This is annoying, since some applications will look better if they respect the foreground and background colors the user has set for his terminal. Is there some way support for using the default colors could be added? Currently, the programmer can write his own clear method and use a hack to use the default colors, but he should not have to do this.

nsf commented 12 years ago

Uhm, yeah, it's an interesting problem. I'm a bit busy right now, but later (this week probably) I'll add an ability to override clear colors. I'm not sure if there is a way to detect an actual terminal theme (if it's black on white or white on black).