mirror of https://github.com/YosysHQ/abc.git
Command to test console colors.
This commit is contained in:
parent
37fd2b93a5
commit
a2050baf6b
|
|
@ -54,16 +54,16 @@ void Abc_ColorTest()
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
int x, y;
|
int x, y;
|
||||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
printf( "Background color 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15\n" );
|
printf( "Background color 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15\n" );
|
||||||
printf( " -----------------------------------------------\n" );
|
printf( " ------------------------------------------------------------------------------\n" );
|
||||||
for ( y = 0; y < 16; y++ )
|
for ( y = 0; y < 16; y++ )
|
||||||
{
|
{
|
||||||
printf( "Foreground color %02d", y );
|
printf( "Foreground color %02d", y );
|
||||||
for ( x = 0; x < 16; x++ )
|
for ( x = 0; x < 16; x++ )
|
||||||
{
|
{
|
||||||
printf( " " );
|
printf( " " );
|
||||||
SetConsoleTextAttribute( hConsole, (WORD)(16 * y + x) );
|
SetConsoleTextAttribute( hConsole, (WORD)(16 * x + y) );
|
||||||
printf( "Hi" );
|
printf( " Hi " );
|
||||||
SetConsoleTextAttribute( hConsole, 7 );
|
SetConsoleTextAttribute( hConsole, 7 );
|
||||||
}
|
}
|
||||||
printf( "\n" );
|
printf( "\n" );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue