Botpack
Class TeamSayMessagePlus

source: e:\games\UnrealTournament\Botpack\Classes\TeamSayMessagePlus.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.LocalMessage
            |
            +--Botpack.LocalMessagePlus
               |
               +--Botpack.StringMessagePlus
                  |
                  +--Botpack.TeamSayMessagePlus
Direct Known Subclasses:None

class TeamSayMessagePlus
extends Botpack.StringMessagePlus



Function Summary
 string AssembleString(HUD myHUD, optional int, optional PlayerReplicationInfo, optional String)
 void RenderComplexMessage(Canvas Canvas, out float, out float, optional string, optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)



Source Code


00001	class TeamSayMessagePlus expands StringMessagePlus;
00002	
00003	static function RenderComplexMessage( 
00004		Canvas Canvas, 
00005		out float XL,
00006		out float YL,
00007		optional string MessageString,
00008		optional int Switch,
00009		optional PlayerReplicationInfo RelatedPRI_1, 
00010		optional PlayerReplicationInfo RelatedPRI_2,
00011		optional Object OptionalObject
00012		)
00013	{
00014		local string LocationName;
00015	
00016		if (RelatedPRI_1 == None)
00017			return;
00018	
00019		Canvas.DrawColor = Default.GreenColor;
00020		Canvas.DrawText( RelatedPRI_1.PlayerName$" ", False );
00021		Canvas.SetPos( Canvas.CurX, Canvas.CurY - YL );
00022		if ( RelatedPRI_1.PlayerLocation != None )
00023			LocationName = RelatedPRI_1.PlayerLocation.LocationName;
00024		else if ( RelatedPRI_1.PlayerZone != None )
00025			Locationname = RelatedPRI_1.PlayerZone.ZoneName;
00026	
00027		if (LocationName != "")
00028		{
00029			Canvas.DrawColor = Default.CyanColor;
00030			Canvas.DrawText( " ("$LocationName$"):", False );
00031		}
00032		else
00033			Canvas.DrawText( ": ", False );
00034		Canvas.SetPos( Canvas.CurX, Canvas.CurY - YL );
00035		Canvas.DrawColor = Default.LightGreenColor;
00036		Canvas.DrawText( MessageString, False );
00037	}
00038	
00039	static function string AssembleString(
00040		HUD myHUD,
00041		optional int Switch,
00042		optional PlayerReplicationInfo RelatedPRI_1, 
00043		optional String MessageString
00044		)
00045	{
00046		local string LocationName;
00047	
00048		if (RelatedPRI_1 == None)
00049			return "";
00050		if ( RelatedPRI_1.PlayerLocation != None )
00051			LocationName = RelatedPRI_1.PlayerLocation.LocationName;
00052		else if ( RelatedPRI_1.PlayerZone != None )
00053			Locationname = RelatedPRI_1.PlayerZone.ZoneName;
00054		if ( Locationname == "" )
00055			return RelatedPRI_1.PlayerName$" "$": "$MessageString;
00056		else
00057			return RelatedPRI_1.PlayerName$"  ("$LocationName$"): "$MessageString;
00058	}
00059	
00060	defaultproperties
00061	{
00062	     bComplexString=True
00063	     DrawColor=(R=0,B=0)
00064	}

End Source Code