Originally Posted by
brewbuck
I would not have expected A_BOLD not to work on Windows, since the Windows standard terminal uses ANSI codes and ANSI definitely supports boldness. Weird. What do you see when you run your program in full-screen terminal mode?
Yes, but notice that the "bold" colors are accessible through direct indexing, where as in Linux it appears not to be. So they're there, but like everything else Windows goes about it all wrong.
Now, when I said that "A_BOLD" doesn't do anything I was mistaken. I've never gotten "setattr(A_BOLD);" to do anything, but if I attach it to a addch something like (I'm sure I'm screwing up the exact details) "addch('X'&COLOR_PAIR(1)&A_BOLD);" then it seems to work. Can't figure it out.
Also, what are you trying to learn through these tests? As far as I know, the default curses colors are mostly standardized.
Quote:
Also, what are you trying to learn through these tests? As far as I know, the default curses colors are mostly standardized.
I think guesst is trying to write programs that people like me will be able to run. My Linux system displayed the colours of his Tetris program very strangely.
And BINGO was his name-o. I want my little project to be as cross-compatible friendly as possible, and when I see screen caps by DWKS, well it just makes me cry.
But I think unless I get someone as crazy as I am dedicated to debugging my programs for their systems I'll need to load Linux up and buy myself "Linux for Dummies."
However, if either of you two helpful people wouldn't mind, I have one more:
Code:
#include <curses.h>
int main () {
int x, y, c;
initscr ();
start_color ();
c = 0;
for (x = 0; x < COLORS; x++) for (y = 0; y < COLORS; y++) {
init_pair (++c, x, y);
attrset (COLOR_PAIR(c));
mvaddch(y+2, x+5, (x > y) ? '#' : '/');
}
for (x = 0; x < COLORS; x++) for (y = 0; y < COLORS; y++) {
init_pair (++c, x, y);
attrset (COLOR_PAIR(c));
attron (A_BOLD);
mvaddch(8+y+2, 8+x+5, (x > y) ? '#' : '/');
}
refresh ();
getch();
endwin ();
}