Skip to content

Commit

Permalink
tab complete for gl_enemycolor, gl_teamcolor, and `cl_damagehueco…
Browse files Browse the repository at this point in the history
…lor`
  • Loading branch information
timbergeron committed Oct 1, 2024
1 parent dc94bd1 commit 363f57a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Quake/gl_rmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,33 @@ static void ClearParticles_f (cvar_t* var)
PScript_ClearParticles ();
}

/*
===============
GL_Skin_Completion_f -- woods #iwtabcomplete
===============
*/
static void GL_Skin_Completion_f (cvar_t* cvar, const char* partial)
{
Con_AddToTabList("0x66ff00", partial, "bright green", NULL); // #demolistsort add arg
Con_AddToTabList("0xfff700", partial, "bright yellow", NULL); // #demolistsort add arg
Con_AddToTabList("0xff00cd", partial, "bright pink", NULL); // #demolistsort add arg

return;
}

/*
===============
Cl_Damagehue_Completion_f -- woods #iwtabcomplete
===============
*/
static void Cl_Damagehue_Completion_f (cvar_t* cvar, const char* partial)
{
Con_AddToTabList("0xeb580e", partial, "bright orange", NULL); // #demolistsort add arg
Con_AddToTabList("0xff0000", partial, "red", NULL); // #demolistsort add arg

return;
}

/*
===============
R_Init
Expand Down Expand Up @@ -291,7 +318,9 @@ void R_Init (void)
Cvar_RegisterVariable (&gl_playermip);
Cvar_RegisterVariable (&gl_nocolors);
Cvar_RegisterVariable (&gl_enemycolor); // woods #enemycolors
Cvar_SetCompletion (&gl_enemycolor, &GL_Skin_Completion_f); // woods #iwtabcomplete
Cvar_RegisterVariable (&gl_teamcolor); // woods #enemycolors
Cvar_SetCompletion (&gl_teamcolor, &GL_Skin_Completion_f); // woods #iwtabcomplete
Cvar_RegisterVariable (&gl_laserpoint); // woods #laser
Cvar_RegisterVariable (&gl_laserpoint_alpha); // woods #laser
Cvar_RegisterVariable (&trace_any); // woods #tracers
Expand Down Expand Up @@ -334,6 +363,7 @@ void R_Init (void)

Cvar_RegisterVariable (&cl_damagehue); // woods #damage
Cvar_RegisterVariable (&cl_damagehuecolor); // woods #damage
Cvar_SetCompletion (&cl_damagehuecolor, &Cl_Damagehue_Completion_f); // woods #iwtabcomplete
Cvar_RegisterVariable(&cl_autodemo); // woods #autodemo

Cvar_RegisterVariable (&gl_zfix); // QuakeSpasm z-fighting fix
Expand Down

0 comments on commit 363f57a

Please sign in to comment.