You know how you can change the transparency of water with the cvar
r_wateralpha? You also know how if you pull down the console, it is
somewhat transparent so you can still see the level?
In this tutorial I'll show you how to make a new cvar "con_alpha" that you can use to change
the transparency of the console. Open gl_draw.c
Find the Draw_Init function. In the space above this function, add this line: cvar_t con_alpha = {"con_alpha", "0.6"};
Inside this function, after the line Cvar_RegisterVariable (&gl_picmip);, add: Cvar_RegisterVariable (&con_alpha);
Find the Draw_ConsoleBackground function. In this function, change this line: Draw_AlphaPic (0, lines - vid.height, conback, (float)(1.2 * lines)/y); Draw_AlphaPic (0, lines - vid.height, conback, (float)(2 * con_alpha.value * lines)/y);
That's all there is to it. The new cvar con_alpha works just like r_waterwarp. |