Botpack
Class LMSScoreBoard

source: e:\games\UnrealTournament\Botpack\Classes\LMSScoreboard.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.ScoreBoard
            |
            +--Botpack.TournamentScoreBoard
               |
               +--Botpack.LMSScoreBoard
Direct Known Subclasses:None

class LMSScoreBoard
extends Botpack.TournamentScoreBoard

//============================================================================= // LMSScoreBoard //=============================================================================
Variables
 string VictoryGoal


Function Summary
 void DrawCategoryHeaders(Canvas Canvas)
 void DrawNameAndPing(Canvas Canvas, PlayerReplicationInfo PRI, float XOffset, float YOffset, bool bCompressed)
 void DrawVictoryConditions(Canvas Canvas)



Source Code


00001	//=============================================================================
00002	// LMSScoreBoard
00003	//=============================================================================
00004	class LMSScoreBoard extends TournamentScoreBoard;
00005	
00006	var localized string VictoryGoal;
00007	
00008	function DrawCategoryHeaders(Canvas Canvas)
00009	{
00010		local float Offset, XL, YL;
00011	
00012		Offset = Canvas.CurY;
00013		Canvas.DrawColor = WhiteColor;
00014	
00015		Canvas.StrLen(PlayerString, XL, YL);
00016		Canvas.SetPos((Canvas.ClipX / 8)*2 - XL/2, Offset);
00017		Canvas.DrawText(PlayerString);
00018	
00019		Canvas.StrLen(FragsString, XL, YL);
00020		Canvas.SetPos((Canvas.ClipX / 8)*6 - XL/2, Offset);
00021		Canvas.DrawText(FragsString);
00022	
00023		if (Level.NetMode != NM_StandAlone)
00024		{
00025			Canvas.StrLen(PingString, XL, YL);
00026			Canvas.SetPos((Canvas.ClipX / 8)*7 - XL/2, Offset);
00027			Canvas.DrawText(PingString);
00028		}
00029	}
00030	
00031	function DrawNameAndPing(Canvas Canvas, PlayerReplicationInfo PRI, float XOffset, float YOffset, bool bCompressed)
00032	{
00033		local float XL, YL, XL2;
00034		local Font CanvasFont;
00035	
00036		// Draw Name
00037		if ( PRI.bAdmin )
00038			Canvas.DrawColor = WhiteColor;
00039		else if (PRI.PlayerName == Pawn(Owner).PlayerReplicationInfo.PlayerName)
00040			Canvas.DrawColor = GoldColor;
00041		else 
00042			Canvas.DrawColor = CyanColor;
00043		Canvas.SetPos((Canvas.ClipX / 8) * 1.5, YOffset);
00044		Canvas.DrawText(PRI.PlayerName, False);
00045	
00046		Canvas.StrLen( "0000", XL, YL );
00047	
00048		// Draw Score
00049		if ( PRI.Score < 1 )
00050			Canvas.DrawColor = LightCyanColor;
00051		else
00052			Canvas.DrawColor = GoldColor;
00053		Canvas.StrLen( int(PRI.Score), XL2, YL );
00054		Canvas.SetPos( (Canvas.ClipX / 8) * 6 + XL/2 - XL2, YOffset );
00055		Canvas.DrawText( int(PRI.Score), false );
00056	
00057		if (Level.NetMode != NM_Standalone)
00058		{
00059			// Draw Ping
00060			Canvas.DrawColor = LightCyanColor;
00061			Canvas.StrLen( PRI.Ping, XL2, YL );
00062			Canvas.SetPos( (Canvas.ClipX / 8) * 7 + XL/2 - XL2, YOffset );
00063			Canvas.DrawText( PRI.Ping, false );
00064		}
00065	}
00066	
00067	function DrawVictoryConditions(Canvas Canvas)
00068	{
00069		Canvas.DrawText(VictoryGoal);
00070	}
00071	
00072	defaultproperties
00073	{
00074	     VictoryGoal="Be the last one alive!"
00075	     FragsString="Lives"
00076	}

End Source Code