Closed Zorgatone closed 8 years ago
Let's see
:smile: :+1:
Please test the background-color
branch on my fork
Working fine on Windows' CMD
. Tested on Windows 10, with raster fonts
How do you reset the background color?
For me resetColor()
is resetting the foreground color correctly. But when I cls()
the screen after that reset, I still get the wrong background
Example:
#include <stdio.h>
#include <stdlib.h>
#include "rlutil.h"
int main(void) {
cls();
saveDefaultColor(); // Saved GREY foreground
/* Now I change foreground and background colors */
setBackgroundColor(WHITE);
setColor(BLACK);
printf("Hello world!\n");
getch();
resetColor(); // Trying to reset the color (only Foreground is reset)
cls(); // Here the CMD is GREY on WHITE instead of GREY on BLACK
return 0;
}
Interesting
The CPP test seemed to work corretly though. Could it be just C?
Oh nevermind. That was because you were resetting it explicitly to black again
I forgot to reset all attributes in resetColor()
, your example works now
Good I'll try tomorrow :smile:
Windows fix pushed, still not sure if works with ANSI
Fixed, submitting a PR
Closing, since nabijaczleweli's implementation is merged to master.
Is there any support for background colors? If not, could we have it added? :smile: