]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Give cvar aliases purple color
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 9 Jun 2020 15:39:59 +0000 (15:39 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 9 Jun 2020 15:39:59 +0000 (15:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12661 d7cf8633-e32d-0410-b094-e92efae38249

cvar.c

diff --git a/cvar.c b/cvar.c
index 3e2a251199d625d766cae6aac2f48401f63112c1..fcd5062b3f408dc4238e60d779336fd5e1552e9f 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -268,7 +268,12 @@ const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, in
 
 void Cvar_PrintHelp(cvar_t *cvar, const char *name, qboolean full)
 {
-       Con_Printf("^3%s^7 is \"%s\" [\"%s\"]", name, ((cvar->flags & CVAR_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
+       // Aliases are purple, cvars are yellow
+       if (strcmp(cvar->name, name))
+               Con_Printf("^6");
+       else
+               Con_Printf("^3");
+       Con_Printf("%s^7 is \"%s\" [\"%s\"]", name, ((cvar->flags & CVAR_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
        if (strcmp(cvar->name, name))
                Con_Printf(" (also ^3%s^7)", cvar->name);
        if (full)