#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];
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);