mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: client: font: add special flag to ignore linefeeds when drawing strings
This commit is contained in:
parent
82b6da493a
commit
d14e486721
@ -207,8 +207,12 @@ int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *fon
|
||||
if( !*s )
|
||||
break;
|
||||
|
||||
draw_len = 0;
|
||||
y += font->charHeight;
|
||||
// some client functions ignore newlines
|
||||
if( !FBitSet( flags, FONT_DRAW_NOLF ))
|
||||
{
|
||||
draw_len = 0;
|
||||
y += font->charHeight;
|
||||
}
|
||||
}
|
||||
|
||||
if( IsColorString( s ))
|
||||
|
@ -325,6 +325,7 @@ typedef struct
|
||||
#define FONT_DRAW_UTF8 BIT( 1 ) // call UtfProcessChar
|
||||
#define FONT_DRAW_FORCECOL BIT( 2 ) // ignore colorcodes
|
||||
#define FONT_DRAW_NORENDERMODE BIT( 3 ) // ignore font's default rendermode
|
||||
#define FONT_DRAW_NOLF BIT( 4 ) // ignore \n
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user