static int WM_DrawInfoLine( int x, int y, float fade ) { int w, defender, winner; const char *s; vec4_t tclr = { 0.6f, 0.6f, 0.6f, 1.0f }; if ( cg.snap->ps.pm_type != PM_INTERMISSION ) { return y; } w = 360; // CG_DrawPic( 320 - w/2, y, w, INFO_LINE_HEIGHT, trap_R_RegisterShaderNoMip( "ui/assets/mp_line_strip.tga" ) ); s = CG_ConfigString( CS_MULTI_INFO ); defender = atoi( Info_ValueForKey( s, "defender" ) ); s = CG_ConfigString( CS_MULTI_MAPWINNER ); winner = atoi( Info_ValueForKey( s, "winner" ) ); if ( cgs.currentRound ) { // first round s = va( CG_TranslateString( "CLOCK IS NOW SET TO %s!" ), WM_TimeToString( cgs.nextTimeLimit * 60.f * 1000.f ) ); } else { // second round if ( !defender ) { if ( winner != defender ) s = "ALLIES SUCCESSFULLY BEAT THE CLOCK!"; else s = "ALLIES COULDN'T BEAT THE CLOCK!"; } else { if ( winner != defender ) s = "AXIS SUCCESSFULLY BEAT THE CLOCK!"; else s = "AXIS COULDN'T BEAT THE CLOCK!"; } s = CG_TranslateString( s ); } CG_FillRect( 320 - w/2, y, w, 20, clrUiBar ); CG_DrawRect_FixedBorder( 320 - w/2, y, w, 20, 1, colorBlack ); w = CG_Text_Width_Ext( s, 0.25f, 0, &cgs.media.limboFont1 ); CG_Text_Paint_Ext( 320 - w*0.5f, y + 15, 0.25f, 0.25f, tclr, s, 0, 0, 0, &cgs.media.limboFont1 ); // CG_DrawSmallString( 320 - w/2, ( y + INFO_LINE_HEIGHT / 2 ) - SMALLCHAR_HEIGHT / 2, s, fade ); return y + INFO_LINE_HEIGHT + 6; }
static int WM_DrawInfoLine( int x, int y, float fade ) { int w, defender, winner; const char *s; if ( cg.snap->ps.pm_type != PM_INTERMISSION ) { return y; } w = 300; CG_DrawPic( 320 - w / 2, y, w, INFO_LINE_HEIGHT, trap_R_RegisterShaderNoMip( "ui_mp/assets/mp_line_strip.tga" ) ); s = CG_ConfigString( CS_MULTI_INFO ); defender = atoi( Info_ValueForKey( s, "defender" ) ); s = CG_ConfigString( CS_MULTI_MAPWINNER ); winner = atoi( Info_ValueForKey( s, "winner" ) ); if ( cgs.currentRound ) { // first round s = va( CG_TranslateString( "Clock is now set to %s!" ), WM_TimeToString( cgs.nextTimeLimit * 60.f * 1000.f ) ); } else { // second round if ( !defender ) { if ( winner != defender ) { s = "Allies sucessfully beat the clock!"; } else { s = "Allies couldn't beat the clock!"; } } else { if ( winner != defender ) { s = "Axis sucessfully beat the clock!"; } else { s = "Axis couldn't beat the clock!"; } } s = CG_TranslateString( s ); } w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( 320 - w / 2, ( y + INFO_LINE_HEIGHT / 2 ) - SMALLCHAR_HEIGHT / 2, s, fade ); return y + INFO_LINE_HEIGHT + 10; }
static int WM_DrawInfoLine(int x, int y, float fade) { int w, defender, winner; const char *s; if (cg.snap->ps.pm_type != PM_INTERMISSION) { return y; } w = 360; s = CG_ConfigString(CS_MULTI_INFO); defender = atoi(Info_ValueForKey(s, "d")); // defender s = CG_ConfigString(CS_MULTI_MAPWINNER); winner = atoi(Info_ValueForKey(s, "w")); if (cgs.currentRound) { // first round s = va(CG_TranslateString("CLOCK IS NOW SET TO %s!"), WM_TimeToString(cgs.nextTimeLimit * 60.f * 1000.f)); } else { // second round if (!defender) { if (winner != defender) { s = "ALLIES SUCCESSFULLY BEAT THE CLOCK!"; } else { s = "ALLIES COULDN'T BEAT THE CLOCK!"; } } else { if (winner != defender) { s = "AXIS SUCCESSFULLY BEAT THE CLOCK!"; } else { s = "AXIS COULDN'T BEAT THE CLOCK!"; } } s = CG_TranslateString(s); } CG_FillRect(Ccg_WideX(320) - w / 2, y, w, 20, clrUiBar); CG_DrawRect_FixedBorder(Ccg_WideX(320) - w / 2, y, w, 20, 1, colorBlack); w = CG_Text_Width_Ext(s, 0.25f, 0, &cgs.media.limboFont1); CG_Text_Paint_Ext(Ccg_WideX(320) - w * 0.5f, y + 15, 0.25f, 0.25f, tclr, s, 0, 0, 0, &cgs.media.limboFont1); return y + INFO_LINE_HEIGHT + 6; }