- used TEXTCOLOR_ #defines for colorizing CCMD list, remove use of strbin1.

This commit is contained in:
Christoph Oelckers 2013-07-28 17:15:47 +02:00 committed by Randy Heit
parent 0c850e8ddd
commit 6dee878b2e

View file

@ -2125,16 +2125,16 @@ static bool C_TabCompleteList ()
const char* colorcode = ""; const char* colorcode = "";
FConsoleCommand* ccmd; FConsoleCommand* ccmd;
if (FindCVar (TabCommands[i].TabName, NULL)) if (FindCVar (TabCommands[i].TabName, NULL))
colorcode = "\\c[Green]"; colorcode = TEXTCOLOR_GREEN;
else if ((ccmd = FConsoleCommand::FindByName (TabCommands[i].TabName)) != NULL) else if ((ccmd = FConsoleCommand::FindByName (TabCommands[i].TabName)) != NULL)
{ {
if (ccmd->IsAlias()) if (ccmd->IsAlias())
colorcode = "\\c[Red]"; colorcode = TEXTCOLOR_RED;
else else
colorcode = "\\c[Light Blue]"; colorcode = TEXTCOLOR_LIGHTBLUE;
} }
Printf ("%s%-*s", strbin1 (colorcode).GetChars(), int(maxwidth), TabCommands[i].TabName.GetChars()); Printf ("%s%-*s", colorcode, int(maxwidth), TabCommands[i].TabName.GetChars());
x += maxwidth; x += maxwidth;
if (x > ConCols - maxwidth) if (x > ConCols - maxwidth)
{ {