/* ============ sdGameRules::GetBrowserStatusString ============ */ void sdGameRulesCampaign::GetBrowserStatusString( idWStr& str, const sdNetSession& netSession ) const { str.Clear(); const idDict& serverInfo = netSession.GetServerInfo(); const char* campaignName = serverInfo.GetString( "si_campaign" ); if( campaignName[ 0 ] != '\0' ) { const sdDeclCampaign* campaign = gameLocal.declCampaignType.LocalFind( campaignName, false ); if( campaign != NULL ) { const char* campaignInfo = serverInfo.GetString( "si_campaignInfo" ); int num = 1; int i = 0; while( campaignInfo[ i ] != '\0' ) { if( idStr::CharIsNumeric( campaignInfo[ i ] ) ) { num++; } i++; } // jrad - if we're reviewing, // we've received the win info, but haven't moved on to the next map yet if( netSession.GetGameState() & PGS_REVIEWING ) { num--; } idWStrList args( 3 ); args.SetNum( 3 ); sdGameRules::GetBrowserStatusString( args[ 0 ], netSession ); args[ 1 ] = va( L"%i", num ); args[ 2 ] = va( L"%i", campaign->GetNumMaps() ); str = common->LocalizeText( "guis/mainmenu/campaign_status", args ); } } }
/* ============ sdGameRulesStopWatch::GetBrowserStatusString ============ */ void sdGameRulesStopWatch::GetBrowserStatusString( idWStr& str, const sdNetSession& netSession ) const { str.Clear(); sdGameRules::GetBrowserStatusString( str, netSession ); str += L" - "; if( netSession.GetGameState() & PGS_RETURN ) { str += declHolder.declLocStrType.LocalFind( "guis/hud/stopwatch_2" )->GetText(); } else { str += declHolder.declLocStrType.LocalFind( "guis/hud/stopwatch_1" )->GetText(); } }
/* ================ sdDeclToolTip::GetMessage ================ */ void sdDeclToolTip::GetMessage( sdToolTipParms* formatting, idWStr& text ) const { text.Clear(); if ( !messages.Num() ) { return; } int num = gameLocal.random.RandomInt( messages.Num() ); message_t* message = messages[ num ]; for ( int i = 0; i < message->blurbs.Num(); i++ ) { text += message->blurbs[ i ]->GetText( formatting ); } }