Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UTMenu.NotifyWindow | +--UTMenu.SpeechMiniDisplay
string
ArrowString
UTFadeTextArea
DisplayArea
HumanString
LocationString
NameString
OrdersString
void
BeforePaint(Canvas C, float X, float Y)
bool
CheckMousePassThrough(float X, float Y)
Created()
FillInfo(int Index, string Callsign)
Reset()
00001 class SpeechMiniDisplay expands NotifyWindow; 00002 00003 var UTFadeTextArea DisplayArea; 00004 00005 var string ArrowString; 00006 var localized string NameString; 00007 var localized string OrdersString; 00008 var localized string LocationString; 00009 var localized string HumanString; 00010 00011 function Created() 00012 { 00013 Super.Created(); 00014 00015 bAlwaysOnTop = True; 00016 bLeaveOnScreen = True; 00017 00018 DisplayArea = UTFadeTextArea(CreateWindow(class'UTFadeTextArea', 100, 100, 100, 100)); 00019 DisplayArea.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetSmallFont(Root); 00020 DisplayArea.TextColor.R = 255; 00021 DisplayArea.TextColor.G = 255; 00022 DisplayArea.TextColor.B = 255; 00023 DisplayArea.FadeFactor = 6; 00024 DisplayArea.bMousePassThrough = True; 00025 } 00026 00027 function BeforePaint(Canvas C, float X, float Y) 00028 { 00029 Super.BeforePaint(C, X, Y); 00030 00031 DisplayArea.WinWidth = WinWidth; 00032 DisplayArea.WinHeight = WinHeight; 00033 DisplayArea.WinLeft = 0; 00034 DisplayArea.WinTop = 0; 00035 } 00036 00037 function Reset() 00038 { 00039 DisplayArea.Clear(); 00040 } 00041 00042 function FillInfo(int Index, string Callsign) 00043 { 00044 local TournamentGameReplicationInfo TRI; 00045 local PlayerReplicationInfo PRI; 00046 local string LocationName; 00047 local int i; 00048 00049 for (i=0; i<32; i++) 00050 { 00051 PRI = GetPlayerOwner().GameReplicationInfo.PRIArray[i]; 00052 if (PRI != None) 00053 { 00054 if ( (PRI.TeamID == Index) && (PRI.Team == GetPlayerOwner().PlayerReplicationInfo.Team) ) 00055 { 00056 DisplayArea.AddText(ArrowString@Callsign); 00057 00058 if ( PRI.PlayerLocation != None ) 00059 LocationName = PRI.PlayerLocation.LocationName; 00060 else if ( PRI.PlayerZone != None ) 00061 LocationName = PRI.PlayerZone.ZoneName; 00062 else 00063 LocationName = ""; 00064 if (LocationName != "") 00065 DisplayArea.AddText(LocationString@LocationName); 00066 00067 TRI = TournamentGameReplicationInfo(GetPlayerOwner().GameReplicationInfo); 00068 if (TRI != None) 00069 { 00070 if ( PRI.IsA('BotReplicationInfo') ) 00071 DisplayArea.AddText(OrdersString@TRI.GetOrderString(PRI)); 00072 else 00073 DisplayArea.AddText(OrdersString@HumanString); 00074 } 00075 } 00076 } 00077 } 00078 } 00079 00080 function bool CheckMousePassThrough(float X, float Y) 00081 { 00082 return True; 00083 } 00084 00085 defaultproperties 00086 { 00087 ArrowString="<<<" 00088 NameString="Name:" 00089 OrdersString="Orders:" 00090 LocationString="Location:" 00091 HumanString="None <Human>" 00092 }