engine: add render_picbutton_text flag to use mainui_cpp font renderer for rendering WON buttons

pull/761/head
Alibek Omarov 12 months ago
parent 6dbb694fdc
commit 203afda053
  1. 1
      common/gameinfo.h
  2. 2
      engine/client/cl_gameui.c
  3. 1
      engine/common/common.h
  4. 5
      engine/common/filesystem.c

@ -18,6 +18,7 @@ GNU General Public License for more details.
#define GFL_NOMODELS (1<<0)
#define GFL_NOSKILLS (1<<1)
#define GFL_RENDER_PICBUTTON_TEXT (1<<2)
/*
========================================================================

@ -417,6 +417,8 @@ static void UI_ConvertGameInfo( GAMEINFO *out, gameinfo_t *in )
out->flags |= GFL_NOMODELS;
if( in->noskills )
out->flags |= GFL_NOSKILLS;
if( in->render_picbutton_text )
out->flags |= GFL_RENDER_PICBUTTON_TEXT;
}
static qboolean PIC_Scissor( float *x, float *y, float *width, float *height, float *u0, float *v0, float *u1, float *v1 )

@ -230,6 +230,7 @@ typedef struct gameinfo_s
qboolean secure; // prevent to console acess
qboolean nomodels; // don't let player to choose model (use player.mdl always)
qboolean noskills; // disable skill menu selection
qboolean render_picbutton_text; // use font renderer to render WON buttons
char sp_entity[32]; // e.g. info_player_start
char mp_entity[32]; // e.g. info_player_deathmatch

@ -1863,6 +1863,11 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->noskills = Q_atoi( token );
}
else if( !Q_stricmp( token, "render_picbutton_text" ))
{
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->render_picbutton_text = Q_atoi( token );
}
}
}

Loading…
Cancel
Save