engine: client: font: add special flag to ignore linefeeds when drawing strings
This commit is contained in:
parent
82b6da493a
commit
d14e486721
2 changed files with 7 additions and 2 deletions
|
@ -207,9 +207,13 @@ int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *fon
|
|||
if( !*s )
|
||||
break;
|
||||
|
||||
// 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…
Add table
Reference in a new issue