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