Making certain text on the client side smaller?


(Seph64) #1

I am getting a little interested in the client-side part of the game (moving things on the HUD to certain places).

The WARMUP: text is a little too big, I already figured out how to move the text, now I just want to know if it is possible to make the text smaller.

I wonder, is it located in the same place as the position part of the of code?

CG_DrawStringExt(320 - w * 12/2, 50, s1, colorWhite, qfalse, qtrue, 12, 18, 0);

I am in cg_draw.c if no one noticed. :slight_smile: Is it one of the other numbers in that particular code?

Any help is appreciated.


(bacon) #2
void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, 
		qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ) {

Look specifically at int charHeight, I haven’t tested it but it’s pretty self-explanatory…

Also, you might want to keep it as a 3/4 ratio for the text size.


(Demolama) #3
CG_DrawStringExt(320 - w * 12/2, 50, s1, colorWhite, qfalse, qtrue, 12, 18, 0);

yup just adjust the 12 and 18

CG_DrawStringExt(320 - w * 12/2+45, 58, s1, colorWhite, qfalse, qtrue, 9, 12, 0);

this is what I did with mine


(Seph64) #4

Thanks for the advice guys.