-
Chronos
-
RE: ncurses - start_color - screen color
-
I contacted Thomas Dickey and he very kindly helped me. Use [b]use_default_colors()[/b] after [b]start_color()[/b]
See [b]http://invisible-island.net/ncurses/ncurses-intro.html[/b] - search for [b]use_default_colors()[/b] This will use the terminal colors as you have them set up.
For example:
[code]
initscr(); // Start curses mode
if(has_colors() == FALSE) // Check the terminal has colour capability
{
endwin(); // Close Window and leave ncurses
printf("Your terminal does not support colour. ");
return(1); // Leave the program
}
start_color(); // Start colour mode
use_default_colors();
...
...
[/code]
Alan
-
14 Jun 12
I contacted Thomas Dickey and he very kindly helped me. Use use_default_colors() after start_color()
See http://invisible-island.net/ncurses/ncurses-intro.html - search for use_default_colors() This will use the terminal colors as you have them set up.
For example:
initscr(); // Start curses mode
if(has_colors() == FALSE) // Check the terminal has colour capability
{
endwin(); // Close Window and leave ncurses
printf("Your terminal does not support colour. ");
return(1); // Leave the program
}
start_color(); // Start colour mode
use_default_colors();
...
...
Alan