diff options
-rw-r--r-- | src/cgame/cg_draw.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 88068c65..f5fb5487 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2084,6 +2084,7 @@ static void CG_DrawLagometer( rectDef_t *rect, float text_x, float text_y, float v; float ax, ay, aw, ah, mid, range; int color; + vec4_t adjustedColor; float vscale; vec4_t white = { 1.0f, 1.0f, 1.0f, 1.0f }; @@ -2093,6 +2094,16 @@ static void CG_DrawLagometer( rectDef_t *rect, float text_x, float text_y, if( !cg_lagometer.integer ) return; + if( cg.demoPlayback ) + return; + + Vector4Copy( textColor, adjustedColor ); + adjustedColor[ 3 ] = 0.25f; + + trap_R_SetColor( adjustedColor ); + CG_DrawPic( rect->x, rect->y, rect->w, rect->h, cgs.media.whiteShader ); + trap_R_SetColor( NULL ); + // // draw the graph // @@ -2218,7 +2229,9 @@ static void CG_DrawLagometer( rectDef_t *rect, float text_x, float text_y, ax = rect->x + ( rect->w / 2.0f ) - ( CG_Text_Width( s, scale, 0 ) / 2.0f ) + text_x; ay = rect->y + ( rect->h / 2.0f ) + ( CG_Text_Height( s, scale, 0 ) / 2.0f ) + text_y; - CG_Text_Paint( ax, ay, scale, textColor, s, 0, 0, ITEM_TEXTSTYLE_NORMAL ); + Vector4Copy( textColor, adjustedColor ); + adjustedColor[ 3 ] = 0.5f; + CG_Text_Paint( ax, ay, scale, adjustedColor, s, 0, 0, ITEM_TEXTSTYLE_NORMAL ); } CG_DrawDisconnect( ); |