]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
the value of r_textshadow now controls the amount of offset for the shadow in pixels...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Apr 2007 20:27:31 +0000 (20:27 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Apr 2007 20:27:31 +0000 (20:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7072 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index 62649f5d0cba813928870c7477aa9bc0bcb060c8..3267e5058e2f9734c49cdcb8204e0b422390036b 100644 (file)
--- 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);