Engine
Class LocalMessage

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

class LocalMessage
extends Engine.Info

// // Represents a schematic for a client localized message. //
Variables
 class ChildMessage
           In some cases, we need to refer to a child message.
 color DrawColor
           Color to display message with.
 int Lifetime
           # of seconds to stay in HUD message queue.
 XPos, YPos
           Coordinates to print message at.
 bool bBeep
           If true, beep!
 bool bCenter
           Whether or not to center the message.
 bool bComplexString
           Indicates a multicolor string message class.
 bool bFadeMessage
           If true, use fade out effect on message.
 bool bFromBottom
           Subtract YPos.
 bool bIsConsoleMessage
           If true, put a GetString on the console.
 bool bIsSpecial
           If true, don't add to normal queue.
 bool bIsUnique
           If true and special, only one can be in the HUD queue at a time.
 bool bOffsetYPos
           If the YPos indicated isn't where the message appears.


Function Summary
 string AssembleString(HUD myHUD, optional int, optional PlayerReplicationInfo, optional String)
 void ClientReceive(PlayerPawn P, optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)
 color GetColor(optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo)
 int GetFontSize(int Switch)
 float GetOffset(int Switch, float YL, float ClipY)
 string GetString(optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)
 void RenderComplexMessage(Canvas Canvas, out float, out float, optional String, optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)



Source Code


00001	//
00002	// Represents a schematic for a client localized message.
00003	//
00004	class LocalMessage expands Info;
00005	
00006	var bool	bComplexString;									// Indicates a multicolor string message class.
00007	var bool	bIsSpecial;										// If true, don't add to normal queue.
00008	var bool	bIsUnique;										// If true and special, only one can be in the HUD queue at a time.
00009	var bool	bIsConsoleMessage;								// If true, put a GetString on the console.
00010	var bool	bFadeMessage;									// If true, use fade out effect on message.
00011	var bool	bBeep;											// If true, beep!
00012	var bool	bOffsetYPos;									// If the YPos indicated isn't where the message appears.
00013	var int		Lifetime;										// # of seconds to stay in HUD message queue.
00014	
00015	var class<LocalMessage> ChildMessage;						// In some cases, we need to refer to a child message.
00016	
00017	// Canvas Variables
00018	var bool	bFromBottom;									// Subtract YPos.
00019	var color	DrawColor;										// Color to display message with.
00020	var float	XPos, YPos;										// Coordinates to print message at.
00021	var bool	bCenter;										// Whether or not to center the message.
00022	
00023	static function RenderComplexMessage( 
00024		Canvas Canvas, 
00025		out float XL,
00026		out float YL,
00027		optional String MessageString,
00028		optional int Switch,
00029		optional PlayerReplicationInfo RelatedPRI_1, 
00030		optional PlayerReplicationInfo RelatedPRI_2,
00031		optional Object OptionalObject
00032		);
00033	
00034	static function string GetString(
00035		optional int Switch,
00036		optional PlayerReplicationInfo RelatedPRI_1, 
00037		optional PlayerReplicationInfo RelatedPRI_2,
00038		optional Object OptionalObject
00039		)
00040	{
00041		return "";
00042	}
00043	
00044	static function string AssembleString(
00045		HUD myHUD,
00046		optional int Switch,
00047		optional PlayerReplicationInfo RelatedPRI_1, 
00048		optional String MessageString
00049		)
00050	{
00051		return "";
00052	}
00053	
00054	static function ClientReceive( 
00055		PlayerPawn P,
00056		optional int Switch,
00057		optional PlayerReplicationInfo RelatedPRI_1, 
00058		optional PlayerReplicationInfo RelatedPRI_2,
00059		optional Object OptionalObject
00060		)
00061	{
00062		if ( P.myHUD != None )
00063			P.myHUD.LocalizedMessage( Default.Class, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject );
00064	
00065		if ( Default.bBeep && P.bMessageBeep )
00066			P.PlayBeepSound();
00067	
00068		if ( Default.bIsConsoleMessage )
00069		{
00070			if ((P.Player != None) && (P.Player.Console != None))
00071				P.Player.Console.AddString(Static.GetString( Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject ));
00072		}
00073	}
00074	
00075	static function color GetColor(
00076		optional int Switch,
00077		optional PlayerReplicationInfo RelatedPRI_1, 
00078		optional PlayerReplicationInfo RelatedPRI_2
00079		)
00080	{
00081		return Default.DrawColor;
00082	}
00083	
00084	static function float GetOffset(int Switch, float YL, float ClipY )
00085	{
00086		return Default.YPos;
00087	}
00088	
00089	static function int GetFontSize( int Switch );
00090	
00091	defaultproperties
00092	{
00093	     Lifetime=3
00094	     DrawColor=(R=255,G=255,B=255)
00095	}

End Source Code