From: havoc Date: Sat, 7 Apr 2007 20:27:31 +0000 (+0000) Subject: the value of r_textshadow now controls the amount of offset for the shadow in pixels... X-Git-Tag: xonotic-v0.1.0preview~3349 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=59ff50d49d9854f1bdca570d2f80ba617c8db783 the value of r_textshadow now controls the amount of offset for the shadow in pixels (formerly it was 25% of text size which typically meant 2 pixels) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7072 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_draw.c b/gl_draw.c index 62649f5d..3267e505 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "cl_video.h" -cvar_t r_textshadow = {CVAR_SAVE, "r_textshadow", "0", "draws a shadow on all text to improve readability"}; +cvar_t r_textshadow = {CVAR_SAVE, "r_textshadow", "0", "draws a shadow on all text to improve readability (note: value controls offset, 1 = 1 pixel, 1.5 = 1.5 pixels, etc)"}; static rtexture_t *char_texture; cachepic_t *r_crosshairs[NUMCROSSHAIRS+1]; @@ -648,10 +648,11 @@ void DrawQ_String_Real(float x, float y, const char *string, int maxlen, float w void DrawQ_String(float x, float y, const char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags) { float shadow; - if (r_textshadow.integer) { + if (r_textshadow.value) + { shadow = (1-((red+green+blue))); shadow = bound(0, shadow, 1); - DrawQ_String_Real(x+scalex*0.25,y+scaley*0.25,string,maxlen,scalex,scaley,shadow,shadow,shadow,alpha*0.8,flags); + DrawQ_String_Real(x+r_textshadow.value,y+r_textshadow.value,string,maxlen,scalex,scaley,shadow,shadow,shadow,alpha*0.8,flags); } DrawQ_String_Real(x,y,string,maxlen,scalex,scaley,red,green,blue,alpha,flags);