Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UTMenu.NotifyWindow | +--UTMenu.MeshBrowser | +--UTMenu.EnemyBrowser
TeamBrowser
TeamWindow
void
BackPressed()
Close(optional bool)
NameSelected(int i)
NextPressed()
Notify(UWindowWindow B, byte E)
SetNumNames()
SetTeamVars()
StartMap(string StartMap, int Rung, string GameType)
TitleClicked()
00001 class EnemyBrowser extends MeshBrowser; 00002 00003 var TeamBrowser TeamWindow; 00004 00005 function SetTeamVars() 00006 { 00007 bTeamGame = Ladder.Default.bTeamGame; 00008 bEnemy = True; 00009 } 00010 00011 function SetInitialBot(class<Bot> InitialBot) 00012 { 00013 if (bTeamGame) 00014 InitialBot.static.SetMultiSkin(MeshWindow.MeshActor, 00015 RMI.GetBotSkin(0, bTeamGame, bEnemy, GetPlayerOwner()), 00016 RMI.GetBotFace(0, bTeamGame, bEnemy, GetPlayerOwner()), 00017 1); 00018 else 00019 InitialBot.static.SetMultiSkin(MeshWindow.MeshActor, 00020 RMI.GetBotSkin(0, bTeamGame, bEnemy, GetPlayerOwner()), 00021 RMI.GetBotFace(0, bTeamGame, bEnemy, GetPlayerOwner()), 00022 RMI.GetBotTeam(0, bTeamGame, bEnemy, GetPlayerOwner())); 00023 } 00024 00025 function SetNumNames() 00026 { 00027 NumNames = MatchInfo.Default.NumBots-MatchInfo.Default.NumAllies; 00028 } 00029 00030 function Notify(UWindowWindow B, byte E) 00031 { 00032 local int i; 00033 local string MeshName, SkinName; 00034 local Class<TournamentPlayer> TournamentClass; 00035 00036 switch (E) 00037 { 00038 case DE_Click: 00039 case DE_DoubleClick: 00040 for (i=0; i<8; i++) 00041 { 00042 if (B == Names[i]) 00043 { 00044 if (!Names[i].bDisabled) 00045 NameSelected(i); 00046 return; 00047 } 00048 } 00049 switch (B) 00050 { 00051 case NextButton: 00052 NextPressed(); 00053 break; 00054 case BackButton: 00055 BackPressed(); 00056 break; 00057 case DescScrollup: 00058 DescArea.ScrollingOffset--; 00059 if (DescArea.ScrollingOffset < 0) 00060 DescArea.ScrollingOffset = 0; 00061 break; 00062 case DescScrolldown: 00063 DescArea.ScrollingOffset++; 00064 if (DescArea.ScrollingOffset > 10) 00065 DescArea.ScrollingOffset = 10; 00066 break; 00067 case Title1: 00068 TitleClicked(); 00069 break; 00070 } 00071 break; 00072 } 00073 } 00074 00075 function NextPressed() 00076 { 00077 local string MapName; 00078 00079 MapName = Ladder.Default.MapPrefix$Ladder.Static.GetMap(Match); 00080 CloseUp(); 00081 StartMap(MapName, Match, GameType); 00082 } 00083 00084 function BackPressed() 00085 { 00086 if (!Ladder.Default.bTeamGame) 00087 { 00088 LadderWindow.ShowWindow(); 00089 Close(); 00090 } else { 00091 HideWindow(); 00092 TeamWindow.ShowWindow(); 00093 } 00094 } 00095 00096 function NameSelected(int i) 00097 { 00098 local Class<Bot> SelectedEnemy; 00099 local Class<RatedMatchInfo> MatchInfo; 00100 00101 MeshWindow.bRotate = False; 00102 MeshWindow.ViewRotator = rot(0, 32768, 0); 00103 MeshWindow.FaceButton.ShowWindow(); 00104 MeshWindow.CenterRotator = rot(0, 0, 0); 00105 00106 Selected = i; 00107 00108 MatchInfo = Ladder.Static.GetMatchConfigType(Match); 00109 SelectedEnemy = class<Bot>(DynamicLoadObject(RMI.GetBotClassName(i, bTeamGame, True, GetPlayerOwner()), Class'Class')); 00110 MeshWindow.SetMeshString(SelectedEnemy.Default.SelectionMesh); 00111 MeshWindow.ClearSkins(); 00112 if (bTeamGame) 00113 SelectedEnemy.static.SetMultiSkin(MeshWindow.MeshActor, RMI.GetBotSkin(i, bTeamGame, True, GetPlayerOwner()), RMI.GetBotFace(i, bTeamGame, True, GetPlayerOwner()), 1); 00114 else 00115 SelectedEnemy.static.SetMultiSkin(MeshWindow.MeshActor, RMI.GetBotSkin(i, bTeamGame, True, GetPlayerOwner()), RMI.GetBotFace(i, bTeamGame, True, GetPlayerOwner()), RMI.GetBotTeam(i, bTeamGame, True, GetPlayerOwner())); 00116 DescArea.Clear(); 00117 DescArea.AddText(NameString$" "$RMI.GetBotName(i, bTeamGame, True, GetPlayerOwner())); 00118 DescArea.AddText(ClassString$" "$RMI.GetBotClassification(i, bTeamGame, True, GetPlayerOwner())); 00119 DescArea.AddText(""); 00120 DescArea.AddText(RMI.GetBotDesc(i, bTeamGame, True, GetPlayerOwner())); 00121 } 00122 00123 function StartMap(string StartMap, int Rung, string GameType) 00124 { 00125 local int Team; 00126 local Class<GameInfo> GameClass; 00127 00128 GameClass = Class<GameInfo>(DynamicLoadObject(GameType, Class'Class')); 00129 GameClass.Static.ResetGame(); 00130 00131 if ((GameType == "Botpack.DeathMatchPlus") || 00132 (GameType == "Botpack.DeathMatchPlusTest")) 00133 Team = 255; 00134 else 00135 Team = 0; 00136 00137 StartMap = StartMap 00138 $"?Game="$GameType 00139 $"?Mutator=" 00140 $"?Tournament="$Rung 00141 $"?Name="$GetPlayerOwner().PlayerReplicationInfo.PlayerName 00142 $"?Team="$Team; 00143 00144 Root.SetMousePos((Root.WinWidth*Root.GUIScale)/2, (Root.WinHeight*Root.GUIScale)/2); 00145 Root.Console.CloseUWindow(); 00146 GetPlayerOwner().ClientTravel(StartMap, TRAVEL_Absolute, True); 00147 } 00148 00149 function Close(optional bool bByParent) 00150 { 00151 if (Ladder.Default.bTeamGame) 00152 TeamWindow.Close(); 00153 00154 RMI = None; 00155 00156 Super.Close(bByParent); 00157 } 00158 00159 function TitleClicked() 00160 { 00161 MeshWindow.SetNoAnimMesh(mesh(DynamicLoadObject(TeamMesh, Class'mesh'))); 00162 MeshWindow.MeshActor.Texture = TeamTex; 00163 MeshWindow.MeshActor.bMeshEnviroMap = True; 00164 MeshWindow.MeshActor.DrawScale = 0.13 * 0.35; 00165 MeshWindow.bRotate = True; 00166 MeshWindow.bFace = False; 00167 MeshWindow.FaceButton.HideWindow(); 00168 MeshWindow.ViewRotator = rot(0, 32768, 0); 00169 MeshWindow.CenterRotator = rot(0, 0, 0); 00170 00171 Selected = -1; 00172 DescArea.Clear(); 00173 DescArea.AddText(RMI.GetTeamName(True, GetPlayerOwner())); 00174 DescArea.AddText(""); 00175 DescArea.AddText(RMI.GetTeamBio(True, GetPlayerOwner())); 00176 } 00177 00178 defaultproperties 00179 { 00180 BGName1(0)="UTMenu.CC11" 00181 BGName1(1)="UTMenu.CC12" 00182 BGName1(2)="UTMenu.CC13" 00183 BGName1(3)="UTMenu.CC14" 00184 BGName2(0)="UTMenu.CC21" 00185 BGName2(1)="UTMenu.CC22" 00186 BGName2(2)="UTMenu.CC23" 00187 BGName2(3)="UTMenu.CC24" 00188 BGName3(0)="UTMenu.CC31" 00189 BGName3(1)="UTMenu.CC32" 00190 BGName3(2)="UTMenu.CC33" 00191 BGName3(3)="UTMenu.CC34" 00192 NameString="Name:" 00193 ClassString="Classification:" 00194 TeamMesh="Botpack.DomB" 00195 TeamTex=Texture'Botpack.Skins.BlueSkin2' 00196 BrowserName="Enemy Roster" 00197 }