16.01.2009, 18:34
Ohh, you should say in first post that we can do this also, for setting text and background colors:
Or maybe make some other #define like
EDIT: Even default cmd color codes are working!
That is still white text on blue background!
Color attributes are specified by two hex digits.
The first corresponds to the background color, the second to the foreground (text) color.
Each digit can be any of the following values:
Now is missing a function GetDefaultConsoleColors() in your plugin! (because it has bug actually, when console's default color isn't black/white). Can't wait
Last thing, can you please make it so we can choose where the background color will start and end (on the x axis). So this can maybe allow multiple colors in a single line. Because actually it starts at 0 (and ends at end of string, which make me think it's probably possible to set where it will start and where it will end too)
pawn Код:
SetConsoleTextColor(CONSOLE_WHITE | BACKGROUND_BLUE);
pawn Код:
#define WHITE_AND_BLUE (CONSOLE_WHITE | BACKGROUND_BLUE)
pawn Код:
SetConsoleTextColor(0x1F);
Color attributes are specified by two hex digits.
The first corresponds to the background color, the second to the foreground (text) color.
Each digit can be any of the following values:
Код:
0 = Black 1 = Blue 2 = Green 3 = Aqua 4 = Red 5 = Purple 6 = Yellow 7 = White 8 = Gray 9 = Light Blue A = Light Green B = Light Aqua C = Light Red D = Light Purple E = Light Yellow F = Bright White
Now is missing a function GetDefaultConsoleColors() in your plugin! (because it has bug actually, when console's default color isn't black/white). Can't wait

Last thing, can you please make it so we can choose where the background color will start and end (on the x axis). So this can maybe allow multiple colors in a single line. Because actually it starts at 0 (and ends at end of string, which make me think it's probably possible to set where it will start and where it will end too)

