UTMenu
Class SlotWindow

source: e:\games\UnrealTournament\UTMenu\Classes\SlotWindow.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UTMenu.NotifyWindow
            |
            +--UTMenu.SlotWindow
Direct Known Subclasses:None

class SlotWindow
extends UTMenu.NotifyWindow


Variables
 string AvgRankStr
 Texture BG1[4]
 Texture BG2[4]
 Texture BG3[4]
 string BGName1[4]
 string BGName2[4]
 string BGName3[4]
 string CompletedStr
 string EmptyText
 string FaceDescs[16]
 string Faces[16]
 NotifyButton GoButton[5]
 NotifyButton KillButton[5]
 string Saves[5]
 NotifyButton SlotButton[5]


Function Summary
 void BeforePaint(Canvas C, float X, float Y)
 void Close(optional bool)
 void Created()
 void HideWindow()
 void IterateFaces(string InSkinName, string MeshName)
 void KillGame(int i)
 void Notify(UWindowWindow B, byte E)
 void Paint(Canvas C, float X, float Y)
 void RestoreGame(int i)
 void SetSaveText(int i, Canvas C)



Source Code


00001	class SlotWindow extends NotifyWindow
00002		config(user);
00003	
00004	// Slots
00005	#exec TEXTURE IMPORT NAME=Save11 FILE=TEXTURES\Save\Save11.PCX GROUP=Skins MIPS=OFF
00006	#exec TEXTURE IMPORT NAME=Save12 FILE=TEXTURES\Save\Save12.PCX GROUP=Skins MIPS=OFF
00007	#exec TEXTURE IMPORT NAME=Save13 FILE=TEXTURES\Save\Save13.PCX GROUP=Skins MIPS=OFF
00008	#exec TEXTURE IMPORT NAME=Save14 FILE=TEXTURES\Save\Save14.PCX GROUP=Skins MIPS=OFF
00009	#exec TEXTURE IMPORT NAME=Save21 FILE=TEXTURES\Save\Save21.PCX GROUP=Skins MIPS=OFF
00010	#exec TEXTURE IMPORT NAME=Save22 FILE=TEXTURES\Save\Save22.PCX GROUP=Skins MIPS=OFF
00011	#exec TEXTURE IMPORT NAME=Save23 FILE=TEXTURES\Save\Save23.PCX GROUP=Skins MIPS=OFF
00012	#exec TEXTURE IMPORT NAME=Save24 FILE=TEXTURES\Save\Save24.PCX GROUP=Skins MIPS=OFF
00013	#exec TEXTURE IMPORT NAME=Save31 FILE=TEXTURES\Save\Save31.PCX GROUP=Skins MIPS=OFF
00014	#exec TEXTURE IMPORT NAME=Save32 FILE=TEXTURES\Save\Save32.PCX GROUP=Skins MIPS=OFF
00015	#exec TEXTURE IMPORT NAME=Save33 FILE=TEXTURES\Save\Save33.PCX GROUP=Skins MIPS=OFF
00016	#exec TEXTURE IMPORT NAME=Save34 FILE=TEXTURES\Save\Save34.PCX GROUP=Skins MIPS=OFF
00017	
00018	#exec TEXTURE IMPORT NAME=SaveButtonsUp FILE=TEXTURES\Save\SaveButtonsUp.PCX GROUP=Skins MIPS=OFF FLAGS=2
00019	#exec TEXTURE IMPORT NAME=SBtnLDwn FILE=TEXTURES\Save\SBtnLDwn.PCX GROUP=Skins MIPS=OFF FLAGS=2
00020	#exec TEXTURE IMPORT NAME=SBtnLGlow FILE=TEXTURES\Save\SBtnLGlow.PCX GROUP=Skins MIPS=OFF FLAGS=2
00021	#exec TEXTURE IMPORT NAME=SBtnRDwn FILE=TEXTURES\Save\SBtnRDwn.PCX GROUP=Skins MIPS=OFF FLAGS=2
00022	#exec TEXTURE IMPORT NAME=SBtnRGlow FILE=TEXTURES\Save\SBtnRGlow.PCX GROUP=Skins MIPS=OFF FLAGS=2
00023	
00024	// Background
00025	var texture BG1[4];
00026	var texture BG2[4];
00027	var texture BG3[4];
00028	var string BGName1[4];
00029	var string BGName2[4];
00030	var string BGName3[4];
00031	
00032	// Slot Buttons
00033	var NotifyButton SlotButton[5];
00034	var localized string EmptyText;
00035	var NotifyButton KillButton[5];
00036	var NotifyButton GoButton[5];
00037	
00038	var globalconfig string Saves[5];
00039	
00040	var localized string AvgRankStr;
00041	var localized string CompletedStr;
00042	
00043	var string Faces[16];
00044	var string FaceDescs[16];
00045	
00046	function Created()
00047	{
00048		local int i;
00049		local int W, H;
00050		local float XWidth, YHeight, XMod, YMod, XPos, YPos, YOffset;
00051		local color TextColor;
00052	
00053		Super.Created();
00054	
00055		/*
00056		 * Setup window parameters.
00057		 */
00058	
00059		bLeaveOnScreen = True;
00060		bAlwaysOnTop = True;
00061	
00062		class'UTLadderStub'.Static.GetStubClass().Static.SetupWinParams(Self, Root, W, H);
00063	
00064		XMod = 4*W;
00065		YMod = 3*H;
00066	
00067		/*
00068		 * Load the background.
00069		 */
00070	
00071		BG1[0] = Texture(DynamicLoadObject(BGName1[0], Class'Texture'));
00072		BG1[1] = Texture(DynamicLoadObject(BGName1[1], Class'Texture'));
00073		BG1[2] = Texture(DynamicLoadObject(BGName1[2], Class'Texture'));
00074		BG1[3] = Texture(DynamicLoadObject(BGName1[3], Class'Texture'));
00075		BG2[0] = Texture(DynamicLoadObject(BGName2[0], Class'Texture'));
00076		BG2[1] = Texture(DynamicLoadObject(BGName2[1], Class'Texture'));
00077		BG2[2] = Texture(DynamicLoadObject(BGName2[2], Class'Texture'));
00078		BG2[3] = Texture(DynamicLoadObject(BGName2[3], Class'Texture'));
00079		BG3[0] = Texture(DynamicLoadObject(BGName3[0], Class'Texture'));
00080		BG3[1] = Texture(DynamicLoadObject(BGName3[1], Class'Texture'));
00081		BG3[2] = Texture(DynamicLoadObject(BGName3[2], Class'Texture'));
00082		BG3[3] = Texture(DynamicLoadObject(BGName3[3], Class'Texture'));
00083	
00084		/*
00085		 * Create components.
00086		 */
00087	
00088		// Slots
00089		XWidth = 480.0/1024 * XMod;
00090		YHeight = 64.0/768 * YMod;
00091		XPos = 310.0/1024 * XMod;
00092		YPos = 89.0/768 * YMod;
00093		YOffset = 132.0/768 * YMod;
00094		for (i=0; i<5; i++)
00095		{
00096			SlotButton[i] = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos + YOffset*i, XWidth, YHeight));
00097			SlotButton[i].NotifyWindow = Self;
00098			TextColor.R = 255;
00099			TextColor.G = 255;
00100			TextColor.B = 0;
00101			SlotButton[i].SetTextColor(TextColor);
00102			SlotButton[i].MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetHugeFont(Root);
00103			SlotButton[i].bStretched = True;
00104		}
00105	
00106		// Kill Buttons
00107		XWidth = 80.0/1024 * XMod;
00108		YHeight = 72.0/768 * YMod;
00109		XPos = 138.0/1024 * XMod;
00110		YPos = 89.0/768 * YMod;
00111		YOffset = 132.0/768 * YMod;
00112		for (i=0; i<5; i++)
00113		{
00114			KillButton[i] = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos + YOffset*i, XWidth, YHeight));
00115			KillButton[i].NotifyWindow = Self;
00116			KillButton[i].Text = "";
00117			KillButton[i].MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00118		}
00119	
00120		// Go Buttons
00121		XWidth = 83.0/1024 * XMod;
00122		YHeight = 72.0/768 * YMod;
00123		XPos = 218.0/1024 * XMod;
00124		YPos = 89.0/768 * YMod;
00125		YOffset = 132.0/768 * YMod;
00126		for (i=0; i<5; i++)
00127		{
00128			GoButton[i] = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos + YOffset*i, XWidth, YHeight));
00129			GoButton[i].NotifyWindow = Self;
00130			GoButton[i].Text = "";
00131			GoButton[i].MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00132		}
00133	
00134		Root.Console.bBlackout = True;
00135	}
00136	
00137	function SetSaveText(int i, Canvas C)
00138	{
00139		local string Temp, Sex, Name;
00140		local int Pos, DMRank, DOMRank, CTFRank, ASRank, ChalRank, AvgRank;
00141		local int DMPosition, DOMPosition, CTFPosition, ASPosition, ChalPosition, TotPosition;
00142		local float XL, YL;
00143		local font CFont;
00144	
00145		// Team
00146		Temp = Right(Saves[i], Len(Saves[i]) - 2);
00147		Pos = InStr(Temp, "\\");
00148	
00149		// DMRank
00150		Temp = Right(Saves[i], Len(Temp) - Pos - 1);
00151		Pos = InStr(Temp, "\\");
00152		DMRank = int(Left(Temp, Pos));
00153	
00154		// DMPosition
00155		Temp = Right(Temp, Len(Temp) - Pos - 1);
00156		Pos = InStr(Temp, "\\");
00157		DMPosition = int(Left(Temp, Pos));
00158	
00159		// DOMRank
00160		Temp = Right(Temp, Len(Temp) - Pos - 1);
00161		Pos = InStr(Temp, "\\");
00162		DOMRank = int(Left(Temp, Pos));
00163	
00164		// DOMPosition
00165		Temp = Right(Temp, Len(Temp) - Pos - 1);
00166		Pos = InStr(Temp, "\\");
00167		DOMPosition = int(Left(Temp, Pos));
00168	
00169		// CTFRank
00170		Temp = Right(Temp, Len(Temp) - Pos - 1);
00171		Pos = InStr(Temp, "\\");
00172		CTFRank = int(Left(Temp, Pos));
00173	
00174		// CTFPosition
00175		Temp = Right(Temp, Len(Temp) - Pos - 1);
00176		Pos = InStr(Temp, "\\");
00177		CTFPosition = int(Left(Temp, Pos));
00178	
00179		// ASRank
00180		Temp = Right(Temp, Len(Temp) - Pos - 1);
00181		Pos = InStr(Temp, "\\");
00182		ASRank = int(Left(Temp, Pos));
00183	
00184		// ASPosition
00185		Temp = Right(Temp, Len(Temp) - Pos - 1);
00186		Pos = InStr(Temp, "\\");
00187		ASPosition = int(Left(Temp, Pos));
00188	
00189		// ChalRank
00190		Temp = Right(Temp, Len(Temp) - Pos - 1);
00191		Pos = InStr(Temp, "\\");
00192		ChalRank = int(Left(Temp, Pos));
00193	
00194		// ChalPosition
00195		Temp = Right(Temp, Len(Temp) - Pos - 1);
00196		Pos = InStr(Temp, "\\");
00197		ChalPosition = int(Left(Temp, Pos));
00198	
00199		// Sex
00200		Temp = Right(Temp, Len(Temp) - Pos - 1);
00201		Pos = InStr(Temp, "\\");
00202	
00203		// Face
00204		Temp = Right(Temp, Len(Temp) - Pos - 1);
00205	
00206		// Name
00207		Temp = Right(Temp, Len(Temp) - 2);
00208		Name = Temp;
00209	
00210		AvgRank = (DMRank + DOMRank + CTFRank + ASRank)/4;
00211		if (class'UTLadderStub'.Static.GetStubClass().Static.IsDemo())
00212		{
00213			if (DMPosition > 0)
00214			{
00215				if (DMRank == 4)
00216					TotPosition += DMPosition;
00217				else
00218					TotPosition += DMPosition-1;
00219			}
00220			if (DOMPosition > 0)
00221			{
00222				if (DOMRank == 4)
00223					TotPosition += DOMPosition;
00224				else
00225					TotPosition += DOMPosition-1;
00226			}
00227			if (CTFPosition > 0)
00228			{
00229				if (CTFRank == 4)
00230					TotPosition += CTFPosition;
00231				else
00232					TotPosition += CTFPosition-1;
00233			}
00234		} else {
00235			if (DMPosition > 0)
00236			{
00237				if (DMRank == 6)
00238					TotPosition += DMPosition;
00239				else
00240					TotPosition += DMPosition-1;
00241			}
00242			if (DOMPosition > 0)
00243			{
00244				if (DOMRank == 6)
00245					TotPosition += DOMPosition;
00246				else
00247					TotPosition += DOMPosition-1;
00248			}
00249			if (CTFPosition > 0)
00250			{
00251				if (CTFRank == 6)
00252					TotPosition += CTFPosition;
00253				else
00254					TotPosition += CTFPosition-1;
00255			}
00256			if (ASPosition > 0)
00257			{
00258				if (ASRank == 6)
00259					TotPosition += ASPosition;
00260				else
00261					TotPosition += ASPosition-1;
00262			}
00263		}
00264		if (ChalPosition > 0)
00265			TotPosition += ChalPosition;
00266		if (ChalRank == 6)
00267			TotPosition++;
00268		if (C.ClipX > 320)
00269			SlotButton[i].Text = Name$" - "$CompletedStr@TotPosition;
00270		else
00271			SlotButton[i].Text = Name;
00272		CFont = C.Font;
00273		C.Font = class'UTLadderStub'.Static.GetStubClass().Static.GetHugeFont(Root);
00274		C.StrLen(SlotButton[i].Text, XL, YL);
00275		if (XL > SlotButton[i].WinWidth)
00276			SlotButton[i].Text = Name;
00277		C.Font = CFont;
00278	}
00279	
00280	function BeforePaint(Canvas C, float X, float Y)
00281	{
00282		local int i;
00283		local int W, H;
00284		local float XWidth, YHeight, XMod, YMod, XPos, YPos, YOffset;
00285	
00286		Super.BeforePaint(C, X, Y);
00287	
00288		class'UTLadderStub'.Static.GetStubClass().Static.SetupWinParams(Self, Root, W, H);
00289	
00290		XMod = 4*W;
00291		YMod = 3*H;
00292	
00293		XWidth = 480.0/1024 * XMod;
00294		YHeight = 64.0/768 * YMod;
00295		XPos = 310.0/1024 * XMod;
00296		YPos = 89.0/768 * YMod;
00297		YOffset = 132.0/768 * YMod;
00298		for (i=0; i<5; i++)
00299		{
00300			SlotButton[i].SetSize(XWidth, YHeight);
00301			SlotButton[i].WinLeft = XPos;
00302			SlotButton[i].WinTop = YPos + YOffset*i;
00303			SlotButton[i].MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetHugeFont(Root);
00304			if (Saves[i] != "")
00305				SetSaveText(i, C);
00306			else
00307				SlotButton[i].Text = EmptyText;
00308		}
00309	
00310		// Kill Buttons
00311		XWidth = 80.0/1024 * XMod;
00312		YHeight = 72.0/768 * YMod;
00313		XPos = 138.0/1024 * XMod;
00314		YPos = 89.0/768 * YMod;
00315		YOffset = 132.0/768 * YMod;
00316		for (i=0; i<5; i++)
00317		{
00318			KillButton[i].SetSize(XWidth, YHeight);
00319			KillButton[i].WinLeft = XPos;
00320			KillButton[i].WinTop = YPos + YOffset*i;
00321		}
00322	
00323		// Go Buttons
00324		XWidth = 83.0/1024 * XMod;
00325		YHeight = 72.0/768 * YMod;
00326		XPos = 218.0/1024 * XMod;
00327		YPos = 89.0/768 * YMod;
00328		YOffset = 132.0/768 * YMod;
00329		for (i=0; i<5; i++)
00330		{
00331			GoButton[i].SetSize(XWidth, YHeight);
00332			GoButton[i].WinLeft = XPos;
00333			GoButton[i].WinTop = YPos + YOffset*i;
00334		}
00335	}
00336	
00337	function Paint(Canvas C, float X, float Y)
00338	{
00339		local int i;
00340		local int XOffset, YOffset;
00341		local int W, H;
00342		local float XWidth, YHeight, XMod, YMod, XPos, YPos, YOffset2;
00343	
00344		W = WinWidth / 4;
00345		H = W;
00346	
00347		if(W > 256 || H > 256)
00348		{
00349			Tile(C, Texture'MenuBlack');
00350			W = 256;
00351			H = 256;
00352		}
00353	
00354		XMod = 4*W;
00355		YMod = 3*H;
00356	
00357		XOffset = (WinWidth - (4 * W)) / 2;
00358		YOffset = (WinHeight - (3 * H)) / 2;
00359	
00360		// Background
00361		DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (0 * H), W+1, H+1, BG1[0]);
00362		DrawStretchedTexture(C, XOffset + (1 * W), YOffset + (0 * H), W+1, H+1, BG1[1]);
00363		DrawStretchedTexture(C, XOffset + (2 * W), YOffset + (0 * H), W+1, H+1, BG1[2]);
00364		DrawStretchedTexture(C, XOffset + (3 * W), YOffset + (0 * H), W+1, H+1, BG1[3]);
00365	
00366		DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (1 * H), W+1, H+1, BG2[0]);
00367		DrawStretchedTexture(C, XOffset + (1 * W), YOffset + (1 * H), W+1, H+1, BG2[1]);
00368		DrawStretchedTexture(C, XOffset + (2 * W), YOffset + (1 * H), W+1, H+1, BG2[2]);
00369		DrawStretchedTexture(C, XOffset + (3 * W), YOffset + (1 * H), W+1, H+1, BG2[3]);
00370			
00371		DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (2 * H), W+1, H+1, BG3[0]);
00372		DrawStretchedTexture(C, XOffset + (1 * W), YOffset + (2 * H), W+1, H+1, BG3[1]);
00373		DrawStretchedTexture(C, XOffset + (2 * W), YOffset + (2 * H), W+1, H+1, BG3[2]);
00374		DrawStretchedTexture(C, XOffset + (3 * W), YOffset + (2 * H), W+1, H+1, BG3[3]);
00375	
00376		XWidth = 256.0/1024 * XMod;
00377		YHeight = 128.0/768 * YMod;
00378		XPos = 138.0/1024 * XMod;
00379		YPos = 87.0/768 * YMod;
00380		YOffset2 = 132.0/768 * YMod;
00381		for (i=0; i<5; i++)
00382		{
00383			if (KillButton[i].bMouseDown)
00384				DrawStretchedTexture(C, XPos, YPos + YOffset2*i, XWidth, YHeight, texture'SBtnLDwn');
00385			else if (GoButton[i].bMouseDown)
00386				DrawStretchedTexture(C, XPos, YPos + YOffset2*i, XWidth, YHeight, texture'SBtnRDwn');
00387			else if (KillButton[i].MouseIsOver())
00388				DrawStretchedTexture(C, XPos, YPos + YOffset2*i, XWidth, YHeight, texture'SBtnLGlow');
00389			else if (GoButton[i].MouseIsOver())
00390				DrawStretchedTexture(C, XPos, YPos + YOffset2*i, XWidth, YHeight, texture'SBtnRGlow');
00391			else
00392				DrawStretchedTexture(C, XPos, YPos + YOffset2*i, XWidth, YHeight, texture'SaveButtonsUp');
00393		}
00394	}
00395	
00396	function Notify(UWindowWindow B, byte E)
00397	{
00398		local LadderInventory LadderObj;
00399		local int i;
00400	
00401		switch (E)
00402		{
00403			case DE_Click:
00404				for (i=0; i<5; i++)
00405				{
00406					if (B == KillButton[i]) {
00407						KillGame(i);
00408					} else if (B == GoButton[i]) {
00409						RestoreGame(i);
00410					}
00411				}
00412				break;
00413		}
00414	}
00415	
00416	function Close(optional bool bByParent)
00417	{
00418		HideWindow();
00419		Root.Console.bNoDrawWorld = Root.Console.ShowDesktop;
00420		Root.Console.bLocked = False;
00421		UMenuRootWindow(Root).MenuBar.ShowWindow();
00422	
00423		Super.Close(bByParent);
00424	}
00425	
00426	function HideWindow()
00427	{
00428		Root.Console.bBlackOut = False;
00429	
00430		Super.HideWindow();
00431	}
00432	
00433	function KillGame(int i)
00434	{
00435		local KillGameQueryWindow KGQWindow;
00436	
00437		if (SlotButton[i].Text != EmptyText)
00438		{
00439			// Are you sure?
00440			KGQWindow = KillGameQueryWindow(Root.CreateWindow(class'KillGameQueryWindow', 100, 100, 100, 100));
00441			KillGameQueryClient(KGQWindow.ClientArea).SlotWindow = Self;
00442			KillGameQueryClient(KGQWindow.ClientArea).SlotIndex = i;
00443			ShowModal(KGQWindow);
00444		}
00445	}
00446	
00447	function RestoreGame(int i)
00448	{
00449		local LadderInventory LadderObj;
00450		local string Temp, Name, PlayerSkin;
00451		local Class<TournamentPlayer> PlayerClass;
00452		local int Pos, Team, j, Face;
00453	
00454		if (Saves[i] == "")
00455			return;
00456	
00457		// Check ladder object.
00458		LadderObj = LadderInventory(GetPlayerOwner().FindInventoryType(class'LadderInventory'));
00459		if (LadderObj == None)
00460		{
00461			// Make them a ladder object.
00462			LadderObj = GetPlayerOwner().Spawn(class'LadderInventory');
00463			LadderObj.GiveTo(GetPlayerOwner());
00464		}
00465	
00466		// Fill the ladder object.
00467	
00468		// Slot...
00469		LadderObj.Slot = i;
00470	
00471		// Difficulty...
00472		LadderObj.TournamentDifficulty = int(Left(Saves[i], 1));
00473		LadderObj.SkillText = class'NewCharacterWindow'.Default.SkillText[LadderObj.TournamentDifficulty];
00474	
00475		// Team
00476		Temp = Right(Saves[i], Len(Saves[i]) - 2);
00477		Pos = InStr(Temp, "\\");
00478		Team = int(Left(Temp, Pos));
00479		LadderObj.Team = class'Ladder'.Default.LadderTeams[Team];
00480	
00481		// DMRank
00482		Temp = Right(Saves[i], Len(Temp) - Pos - 1);
00483		Pos = InStr(Temp, "\\");
00484		LadderObj.DMRank = int(Left(Temp, Pos));
00485	
00486		// DMPosition
00487		Temp = Right(Temp, Len(Temp) - Pos - 1);
00488		Pos = InStr(Temp, "\\");
00489		LadderObj.DMPosition = int(Left(Temp, Pos));
00490	
00491		// DOMRank
00492		Temp = Right(Temp, Len(Temp) - Pos - 1);
00493		Pos = InStr(Temp, "\\");
00494		LadderObj.DOMRank = int(Left(Temp, Pos));
00495	
00496		// DOMPosition
00497		Temp = Right(Temp, Len(Temp) - Pos - 1);
00498		Pos = InStr(Temp, "\\");
00499		LadderObj.DOMPosition = int(Left(Temp, Pos));
00500	
00501		// CTFRank
00502		Temp = Right(Temp, Len(Temp) - Pos - 1);
00503		Pos = InStr(Temp, "\\");
00504		LadderObj.CTFRank = int(Left(Temp, Pos));
00505	
00506		// CTFPosition
00507		Temp = Right(Temp, Len(Temp) - Pos - 1);
00508		Pos = InStr(Temp, "\\");
00509		LadderObj.CTFPosition = int(Left(Temp, Pos));
00510	
00511		// ASRank
00512		Temp = Right(Temp, Len(Temp) - Pos - 1);
00513		Pos = InStr(Temp, "\\");
00514		LadderObj.ASRank = int(Left(Temp, Pos));
00515	
00516		// ASPosition
00517		Temp = Right(Temp, Len(Temp) - Pos - 1);
00518		Pos = InStr(Temp, "\\");
00519		LadderObj.ASPosition = int(Left(Temp, Pos));
00520	
00521		// ChalRank
00522		Temp = Right(Temp, Len(Temp) - Pos - 1);
00523		Pos = InStr(Temp, "\\");
00524		LadderObj.ChalRank = int(Left(Temp, Pos));
00525	
00526		// ChalPosition
00527		Temp = Right(Temp, Len(Temp) - Pos - 1);
00528		Pos = InStr(Temp, "\\");
00529		LadderObj.ChalPosition = int(Left(Temp, Pos));
00530	
00531		// Sex
00532		Temp = Right(Temp, Len(Temp) - Pos - 1);
00533		Pos = InStr(Temp, "\\");
00534		LadderObj.Sex = Left(Temp, Pos);
00535	
00536		// Face
00537		Temp = Right(Temp, Len(Temp) - Pos - 1);
00538		Pos = InStr(Temp, "\\");
00539		Face = int(Left(Temp, Pos));
00540		LadderObj.Face = Face;
00541	
00542		// Name
00543		Temp = Right(Temp, Len(Temp) - 2);
00544		Name = Temp;
00545		GetPlayerOwner().ChangeName(Name);
00546		GetPlayerOwner().UpdateURL("Name", Name, True);
00547	
00548		if (LadderObj.Sex ~= "M")
00549		{
00550			PlayerClass = LadderObj.Team.Default.MaleClass;
00551			PlayerSkin = LadderObj.Team.Default.MaleSkin;
00552		} else {
00553			PlayerClass = LadderObj.Team.Default.FemaleClass;
00554			PlayerSkin = LadderObj.Team.Default.FemaleSkin;
00555		}
00556	
00557		IterateFaces(PlayerSkin, GetPlayerOwner().GetItemName(string(PlayerClass.Default.Mesh)));
00558		GetPlayerOwner().UpdateURL("Class", string(PlayerClass), True);
00559		GetPlayerOwner().UpdateURL("Skin", PlayerSkin, True);
00560		GetPlayerOwner().UpdateURL("Face", Faces[Face], True);
00561		GetPlayerOwner().UpdateURL("Voice", PlayerClass.Default.VoiceType, True);
00562		GetPlayerOwner().UpdateURL("Team", "255", True);
00563	
00564		// Goto Manager
00565		HideWindow();
00566		Root.CreateWindow(class'ManagerWindow', 100, 100, 200, 200, Root, True);
00567	}
00568	
00569	function IterateFaces(string InSkinName, string MeshName)
00570	{
00571		local string SkinName, SkinDesc, TestName, Temp, FaceName;
00572		local bool bNewFormat;
00573		local int i, Pos;
00574	
00575		for (i=0; i<16; i++)
00576		{
00577			FaceDescs[i] = "";
00578			Faces[i] = "";
00579		}
00580	
00581		i = 0;
00582	
00583		SkinName = "None";
00584		TestName = "";
00585		while ( True )
00586		{
00587			GetPlayerOwner().GetNextSkin(MeshName, SkinName, 1, SkinName, SkinDesc);
00588	
00589			if( SkinName == TestName )
00590				break;
00591	
00592			if( TestName == "" )
00593				TestName = SkinName;
00594	
00595			// Multiskin format
00596			if( SkinDesc != "")
00597			{			
00598				Temp = GetPlayerOwner().GetItemName(SkinName);
00599				if(Mid(Temp, 5) != "" && Left(Temp, 4) == GetPlayerOwner().GetItemName(InSkinName))
00600				{
00601					Pos = InStr(SkinName, ".");
00602					FaceDescs[i] = SkinDesc;
00603					Faces[i++] = Left(SkinName, Pos+1)$Mid(Temp, 5);
00604				}
00605			}
00606		}
00607	}
00608	
00609	defaultproperties
00610	{
00611	     BGName1(0)="UTMenu.Save11"
00612	     BGName1(1)="UTMenu.Save12"
00613	     BGName1(2)="UTMenu.Save13"
00614	     BGName1(3)="UTMenu.Save14"
00615	     BGName2(0)="UTMenu.Save21"
00616	     BGName2(1)="UTMenu.Save22"
00617	     BGName2(2)="UTMenu.Save23"
00618	     BGName2(3)="UTMenu.Save24"
00619	     BGName3(0)="UTMenu.Save31"
00620	     BGName3(1)="UTMenu.Save32"
00621	     BGName3(2)="UTMenu.Save33"
00622	     BGName3(3)="UTMenu.Save34"
00623	     EmptyText="UNUSED"
00624	     AvgRankStr="Average Rank:"
00625	     CompletedStr="Matches Won:"
00626	}

End Source Code