UTMenu
Class NewCharacterWindow

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

class NewCharacterWindow
extends UTMenu.NotifyWindow


Variables
 Texture BG1[4]
 Texture BG2[4]
 Texture BG3[4]
 string BGName1[4]
 string BGName2[4]
 string BGName3[4]
 NotifyButton BackButton
 string CCText
 int CurrentSkill
 NotifyButton Descscrolldown
 NotifyButton Descscrollup
 NotifyButton FaceButton
 string FaceDescs[16]
 NotifyButton FaceLabel
 string FaceText
 string Faces[16]
 Class FemaleClass
 FemaleSkin, FemaleFace
 string FemaleText
 float FlashTime
 bool Initialized
 LadderInventory LadderObj
 Class MaleClass
 MaleSkin, MaleFace
 string MaleText
 UMenuPlayerMeshClient MeshWindow
 NotifyButton NameButton
 NameEditBox NameEdit
 NotifyButton NameLabel
 string NameText
 NotifyButton NextButton
 int PreferredFace
 int PreferredSex
 int PreferredSkill
 int PreferredTeam
 NotifyButton SexButton
 NotifyButton SexLabel
 string SexText
 NotifyButton SkillButton
 NotifyButton SkillLabel
 string SkillText[8]
 string SkillsText
 NotifyButton TeamButton
 UTFadeTextArea TeamDescArea
 NotifyButton TeamLabel
 string TeamNameString
 string TeamText
 NotifyButton TitleButton
 bool bFlashOn


Function Summary
 void BackPressed()
 void BeforePaint(Canvas C, float X, float Y)
 void Close(optional bool)
 void Created()
 void FacePressed()
 void HideWindow()
 void IterateFaces(string InSkinName, string MeshName)
 void NameChanged()
 void NextPressed()
 void Notify(UWindowWindow B, byte E)
 void Paint(Canvas C, float X, float Y)
 void SexPressed()
 void SkillPressed()
 void TeamPressed()
 void Tick(float Delta)



Source Code


00001	class NewCharacterWindow extends NotifyWindow
00002		config(user);
00003	
00004	// New Character
00005	#exec TEXTURE IMPORT NAME=TeamPlate FILE=TEXTURES\NewCharacter\TeamPlate.PCX GROUP=Skins MIPS=OFF
00006	#exec TEXTURE IMPORT NAME=CC11 FILE=TEXTURES\NewCharacter\CC11.PCX GROUP=Skins MIPS=OFF
00007	#exec TEXTURE IMPORT NAME=CC12 FILE=TEXTURES\NewCharacter\CC12.PCX GROUP=Skins MIPS=OFF
00008	#exec TEXTURE IMPORT NAME=CC13 FILE=TEXTURES\NewCharacter\CC13.PCX GROUP=Skins MIPS=OFF
00009	#exec TEXTURE IMPORT NAME=CC14 FILE=TEXTURES\NewCharacter\CC14.PCX GROUP=Skins MIPS=OFF
00010	#exec TEXTURE IMPORT NAME=CC21 FILE=TEXTURES\NewCharacter\CC21.PCX GROUP=Skins MIPS=OFF
00011	#exec TEXTURE IMPORT NAME=CC22 FILE=TEXTURES\NewCharacter\CC22.PCX GROUP=Skins MIPS=OFF
00012	#exec TEXTURE IMPORT NAME=CC23 FILE=TEXTURES\NewCharacter\CC23.PCX GROUP=Skins MIPS=OFF
00013	#exec TEXTURE IMPORT NAME=CC24 FILE=TEXTURES\NewCharacter\CC24.PCX GROUP=Skins MIPS=OFF
00014	#exec TEXTURE IMPORT NAME=CC31 FILE=TEXTURES\NewCharacter\CC31.PCX GROUP=Skins MIPS=OFF
00015	#exec TEXTURE IMPORT NAME=CC32 FILE=TEXTURES\NewCharacter\CC32.PCX GROUP=Skins MIPS=OFF
00016	#exec TEXTURE IMPORT NAME=CC33 FILE=TEXTURES\NewCharacter\CC33.PCX GROUP=Skins MIPS=OFF
00017	#exec TEXTURE IMPORT NAME=CC34 FILE=TEXTURES\NewCharacter\CC34.PCX GROUP=Skins MIPS=OFF
00018	
00019	#exec TEXTURE IMPORT NAME=LeftDown FILE=TEXTURES\Buttons\LDwn.PCX GROUP=Skins MIPS=OFF FLAGS=2
00020	#exec TEXTURE IMPORT NAME=LeftOver FILE=TEXTURES\Buttons\LOvr.PCX GROUP=Skins MIPS=OFF FLAGS=2
00021	#exec TEXTURE IMPORT NAME=LeftUp FILE=TEXTURES\Buttons\LUp.PCX GROUP=Skins MIPS=OFF FLAGS=2
00022	#exec TEXTURE IMPORT NAME=RightDown FILE=TEXTURES\Buttons\RDwn.PCX GROUP=Skins MIPS=OFF FLAGS=2
00023	#exec TEXTURE IMPORT NAME=RightOver FILE=TEXTURES\Buttons\ROvr.PCX GROUP=Skins MIPS=OFF FLAGS=2
00024	#exec TEXTURE IMPORT NAME=RightUp FILE=TEXTURES\Buttons\RUp.PCX GROUP=Skins MIPS=OFF FLAGS=2
00025	
00026	#exec TEXTURE IMPORT NAME=Plate FILE=TEXTURES\Ladr\Plate.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00027	#exec TEXTURE IMPORT NAME=Plate2 FILE=TEXTURES\Ladr\Plate2.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00028	#exec TEXTURE IMPORT NAME=PlateCap FILE=TEXTURES\Ladr\PlateCap.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00029	#exec TEXTURE IMPORT NAME=PlateLowCap FILE=TEXTURES\Ladr\PlateLowCap.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00030	#exec TEXTURE IMPORT NAME=Plate3 FILE=TEXTURES\Ladr\Plate3.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00031	#exec TEXTURE IMPORT NAME=Plate3Plain FILE=TEXTURES\Ladr\Plate3Plain.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00032	#exec TEXTURE IMPORT NAME=Plate3Cap FILE=TEXTURES\Ladr\Plate3Cap.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00033	#exec TEXTURE IMPORT NAME=Plate3LowCap FILE=TEXTURES\Ladr\Plate3LowCap.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00034	#exec TEXTURE IMPORT NAME=PlateYellow FILE=TEXTURES\Ladr\PlateYellow.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00035	#exec TEXTURE IMPORT NAME=PlateYellow2 FILE=TEXTURES\Ladr\PlateYellow2.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00036	#exec TEXTURE IMPORT NAME=PlateYellowCap FILE=TEXTURES\Ladr\PlateYellowCap.PCX GROUP=Skins FLAGS=2 MIPS=OFF 
00037	#exec TEXTURE IMPORT NAME=PlateYellowLowCap FILE=TEXTURES\Ladr\PlateYellowLowCap.PCX GROUP=Skins FLAGS=2 MIPS=OFF
00038	
00039	// Background
00040	var texture BG1[4];
00041	var texture BG2[4];
00042	var texture BG3[4];
00043	var string BGName1[4];
00044	var string BGName2[4];
00045	var string BGName3[4];
00046	
00047	// Components
00048	var UMenuPlayerMeshClient MeshWindow;
00049	var Class<TournamentPlayer> MaleClass;
00050	var string MaleSkin, MaleFace;
00051	var Class<TournamentPlayer> FemaleClass;
00052	var string FemaleSkin, FemaleFace;
00053	
00054	var NotifyButton NameLabel;
00055	var localized string NameText;
00056	var NotifyButton NameButton;
00057	var NameEditBox NameEdit;
00058	
00059	var NotifyButton SexLabel;
00060	var localized string SexText;
00061	var NotifyButton SexButton;
00062	var localized string MaleText;
00063	var localized string FemaleText;
00064	
00065	var NotifyButton TeamLabel;
00066	var localized string TeamText;
00067	var NotifyButton TeamButton;
00068	
00069	var NotifyButton FaceLabel;
00070	var localized string FaceText;
00071	var NotifyButton FaceButton;
00072	
00073	var NotifyButton SkillLabel;
00074	var localized string SkillsText;
00075	var NotifyButton SkillButton;
00076	var localized string SkillText[8];
00077	var int CurrentSkill;
00078	
00079	var NotifyButton BackButton;
00080	var NotifyButton NextButton;
00081	
00082	var NotifyButton TitleButton;
00083	var localized string CCText;
00084	
00085	var bool Initialized;
00086	
00087	var string FaceDescs[16];
00088	var string Faces[16];
00089	
00090	var UTFadeTextArea TeamDescArea;
00091	var NotifyButton Descscrollup;
00092	var NotifyButton Descscrolldown;
00093	var localized string TeamNameString;
00094	
00095	// Player
00096	var LadderInventory LadderObj;
00097	
00098	var config int PreferredSkill;
00099	var config int PreferredSex;
00100	var config int PreferredTeam;
00101	var config int PreferredFace;
00102	
00103	var bool bFlashOn;
00104	var float FlashTime;
00105	
00106	function Created()
00107	{
00108		local string MeshName, SkinDesc, Temp;
00109		local int i;
00110		local int W, H;
00111		local float XWidth, YHeight, XMod, YMod, XPos, YPos;
00112		local color TextColor;
00113	
00114		Super.Created();
00115	
00116		/*
00117		 * Setup window parameters.
00118		 */
00119	
00120		bLeaveOnScreen = True;
00121		bAlwaysOnTop = True;
00122	
00123		class'UTLadderStub'.Static.GetStubClass().Static.SetupWinParams(Self, Root, W, H);
00124	
00125		XMod = 4*W;
00126		YMod = 3*H;
00127	
00128		/*
00129		 * Load the background.
00130		 */
00131	
00132		BG1[0] = Texture(DynamicLoadObject(BGName1[0], Class'Texture'));
00133		BG1[1] = Texture(DynamicLoadObject(BGName1[1], Class'Texture'));
00134		BG1[2] = Texture(DynamicLoadObject(BGName1[2], Class'Texture'));
00135		BG1[3] = Texture(DynamicLoadObject(BGName1[3], Class'Texture'));
00136		BG2[0] = Texture(DynamicLoadObject(BGName2[0], Class'Texture'));
00137		BG2[1] = Texture(DynamicLoadObject(BGName2[1], Class'Texture'));
00138		BG2[2] = Texture(DynamicLoadObject(BGName2[2], Class'Texture'));
00139		BG2[3] = Texture(DynamicLoadObject(BGName2[3], Class'Texture'));
00140		BG3[0] = Texture(DynamicLoadObject(BGName3[0], Class'Texture'));
00141		BG3[1] = Texture(DynamicLoadObject(BGName3[1], Class'Texture'));
00142		BG3[2] = Texture(DynamicLoadObject(BGName3[2], Class'Texture'));
00143		BG3[3] = Texture(DynamicLoadObject(BGName3[3], Class'Texture'));
00144	
00145		// Check ladder object.
00146		LadderObj = LadderInventory(GetPlayerOwner().FindInventoryType(class'LadderInventory'));
00147		if (LadderObj == None)
00148		{
00149			Log("NewCharacterWindow: Player has no LadderInventory!!");
00150		}
00151	
00152		/*
00153		 * Create components.
00154		 */
00155	
00156		if (class'UTLadderStub'.Static.GetStubClass().Static.IsDemo())
00157			PreferredTeam = class'Ladder'.Default.NumTeams;
00158	
00159		MaleClass = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.MaleClass;
00160		MaleSkin = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.MaleSkin;
00161	
00162		FemaleClass = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.FemaleClass;
00163		FemaleSkin = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.FemaleSkin;
00164	
00165		IterateFaces(MaleSkin, GetPlayerOwner().GetItemName(string(MaleClass.Default.Mesh)));
00166	
00167		LadderObj.Face = PreferredFace;
00168	
00169		// MeshView
00170		XPos = 608.0/1024 * XMod;
00171		YPos = 88.0/768 * YMod;
00172		XWidth = 323.0/1024 * XMod;
00173		YHeight = 466.0/768 * YMod;
00174		MeshWindow = UMenuPlayerMeshClient(CreateWindow(class'UMenuPlayerMeshClient', XPos, YPos, XWidth, YHeight));
00175		MeshWindow.SetMeshString(MaleClass.Default.SelectionMesh);
00176		MeshWindow.ClearSkins();
00177		MaleClass.static.SetMultiSkin(MeshWindow.MeshActor, MaleSkin, MaleFace, 255);
00178		GetPlayerOwner().UpdateURL("Class", "Botpack."$string(MaleClass.Name), True);
00179		GetPlayerOwner().UpdateURL("Skin", MaleSkin, True);
00180		GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00181		GetPlayerOwner().UpdateURL("Team", "255", True);
00182		GetPlayerOwner().UpdateURL("Voice", MaleClass.Default.VoiceType, True);
00183	
00184		// Name Label
00185		XPos = 164.0/1024 * XMod;
00186		YPos = 263.0/768 * YMod;
00187		XWidth = 256.0/1024 * XMod;
00188		YHeight = 64.0/768 * YMod;
00189		NameLabel = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00190		NameLabel.NotifyWindow = Self;
00191		NameLabel.Text = NameText;
00192		TextColor.R = 255;
00193		TextColor.G = 255;
00194		TextColor.B = 0;
00195		NameLabel.SetTextColor(TextColor);
00196		NameLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00197		NameLabel.bStretched = True;
00198		NameLabel.bDisabled = True;
00199		NameLabel.bDontSetLabel = True;
00200		NameLabel.LabelWidth = 178.0/1024 * XMod;
00201		NameLabel.LabelHeight = 49.0/768 * YMod;
00202	
00203		// Name Button
00204		XPos = 164.0/1024 * XMod;
00205		YPos = 295.0/768 * YMod;
00206		XWidth = 256.0/1024 * XMod;
00207		YHeight = 64.0/768 * YMod;
00208		NameButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00209		NameButton.NotifyWindow = Self;
00210		TextColor.R = 255;
00211		TextColor.G = 255;
00212		TextColor.B = 0;
00213		NameButton.SetTextColor(TextColor);
00214		NameButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00215		NameButton.bStretched = True;
00216		NameButton.bDisabled = True;
00217		NameButton.DisabledTexture = Texture(DynamicLoadObject("UTMenu.Plate3Plain", Class'Texture'));
00218		NameButton.bDontSetLabel = True;
00219		NameButton.LabelWidth = 178.0/1024 * XMod;
00220		NameButton.LabelHeight = 49.0/768 * YMod;
00221		NameButton.OverSound = sound'LadderSounds.lcursorMove';
00222		NameButton.DownSound = sound'SpeechWindowClick';
00223	
00224		// Name Edit
00225		XPos = 164.0/1024 * XMod;
00226		YPos = 295.0/768 * YMod;
00227		XWidth = 178.0/1024 * XMod;
00228		YHeight = 49.0/768 * YMod;
00229		NameEdit = NameEditBox(CreateWindow(class'NameEditBox', XPos, YPos, XWidth, YHeight));
00230		NameEdit.bDelayedNotify = True;
00231		NameEdit.SetValue(GetPlayerOwner().PlayerReplicationInfo.PlayerName);
00232		NameEdit.CharacterWindow = Self;
00233		NameEdit.bCanEdit = True;
00234		NameEdit.bShowCaret = True;
00235		NameEdit.bAlwaysOnTop = True;
00236		NameEdit.bSelectOnFocus = True;
00237		NameEdit.MaxLength = 20;
00238		NameEdit.TextColor.R = 255;
00239		NameEdit.TextColor.G = 255;
00240		NameEdit.TextColor.B = 0;
00241	
00242		// Sex Label
00243		XPos = 164.0/1024 * XMod;
00244		YPos = 338.0/768 * YMod;
00245		XWidth = 256.0/1024 * XMod;
00246		YHeight = 64.0/768 * YMod;
00247		SexLabel = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00248		SexLabel.NotifyWindow = Self;
00249		SexLabel.Text = SexText;
00250		TextColor.R = 255;
00251		TextColor.G = 255;
00252		TextColor.B = 0;
00253		SexLabel.SetTextColor(TextColor);
00254		SexLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00255		SexLabel.bStretched = True;
00256		SexLabel.bDisabled = True;
00257		SexLabel.bDontSetLabel = True;
00258		SexLabel.LabelWidth = 178.0/1024 * XMod;
00259		SexLabel.LabelHeight = 49.0/768 * YMod;
00260	
00261		// Sex Button
00262		XPos = 164.0/1024 * XMod;
00263		YPos = 370.0/768 * YMod;
00264		XWidth = 256.0/1024 * XMod;
00265		YHeight = 64.0/768 * YMod;
00266		SexButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00267		SexButton.NotifyWindow = Self;
00268		SexButton.Text = MaleText;
00269		TextColor.R = 255;
00270		TextColor.G = 255;
00271		TextColor.B = 0;
00272		SexButton.SetTextColor(TextColor);
00273		SexButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00274		SexButton.bStretched = True;
00275		SexButton.UpTexture = Texture(DynamicLoadObject("UTMenu.Plate3Plain", Class'Texture'));
00276		SexButton.DownTexture = Texture(DynamicLoadObject("UTMenu.PlateYellow2", Class'Texture'));
00277		SexButton.OverTexture = Texture(DynamicLoadObject("UTMenu.Plate2", Class'Texture'));
00278		SexButton.bDontSetLabel = True;
00279		SexButton.LabelWidth = 178.0/1024 * XMod;
00280		SexButton.LabelHeight = 49.0/768 * YMod;
00281		SexButton.bIgnoreLDoubleclick = True;
00282		SexButton.OverSound = sound'LadderSounds.lcursorMove';
00283		SexButton.DownSound = sound'SpeechWindowClick';
00284	
00285		// Team Label
00286		XPos = 164.0/1024 * XMod;
00287		YPos = 413.0/768 * YMod;
00288		XWidth = 256.0/1024 * XMod;
00289		YHeight = 64.0/768 * YMod;
00290		TeamLabel = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00291		TeamLabel.NotifyWindow = Self;
00292		TeamLabel.Text = TeamText;
00293		TextColor.R = 255;
00294		TextColor.G = 255;
00295		TextColor.B = 0;
00296		TeamLabel.SetTextColor(TextColor);
00297		TeamLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00298		TeamLabel.bStretched = True;
00299		TeamLabel.bDisabled = True;
00300		TeamLabel.bDontSetLabel = True;
00301		TeamLabel.LabelWidth = 178.0/1024 * XMod;
00302		TeamLabel.LabelHeight = 49.0/768 * YMod;
00303	
00304		// Team Button
00305		XPos = 164.0/1024 * XMod;
00306		YPos = 445.0/768 * YMod;
00307		XWidth = 256.0/1024 * XMod;
00308		YHeight = 64.0/768 * YMod;
00309		TeamButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00310		TeamButton.NotifyWindow = Self;
00311		TextColor.R = 255;
00312		TextColor.G = 255;
00313		TextColor.B = 0;
00314		TeamButton.SetTextColor(TextColor);
00315		TeamButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00316		TeamButton.bStretched = True;
00317		TeamButton.UpTexture = Texture(DynamicLoadObject("UTMenu.Plate3Plain", Class'Texture'));
00318		TeamButton.DownTexture = Texture(DynamicLoadObject("UTMenu.PlateYellow2", Class'Texture'));
00319		TeamButton.OverTexture = Texture(DynamicLoadObject("UTMenu.Plate2", Class'Texture'));
00320		TeamButton.bDontSetLabel = True;
00321		TeamButton.LabelWidth = 178.0/1024 * XMod;
00322		TeamButton.LabelHeight = 49.0/768 * YMod;
00323		TeamButton.bIgnoreLDoubleclick = True;
00324		if ((PreferredTeam == class'Ladder'.Default.NumTeams) && (!class'UTLadderStub'.Static.GetStubClass().Static.IsDemo()))
00325			PreferredTeam = 0;
00326		TeamButton.Text = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.TeamName;
00327		LadderObj.Team = class'Ladder'.Default.LadderTeams[PreferredTeam];
00328		TeamButton.OverSound = sound'LadderSounds.lcursorMove';
00329		TeamButton.DownSound = sound'SpeechWindowClick';
00330	
00331		// Face Label
00332		XPos = 164.0/1024 * XMod;
00333		YPos = 488.0/768 * YMod;
00334		XWidth = 256.0/1024 * XMod;
00335		YHeight = 64.0/768 * YMod;
00336		FaceLabel = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00337		FaceLabel.NotifyWindow = Self;
00338		FaceLabel.Text = FaceText;
00339		TextColor.R = 255;
00340		TextColor.G = 255;
00341		TextColor.B = 0;
00342		FaceLabel.SetTextColor(TextColor);
00343		FaceLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00344		FaceLabel.bStretched = True;
00345		FaceLabel.bDisabled = True;
00346		FaceLabel.bDontSetLabel = True;
00347		FaceLabel.LabelWidth = 178.0/1024 * XMod;
00348		FaceLabel.LabelHeight = 49.0/768 * YMod;
00349	
00350		// Face Button
00351		XPos = 164.0/1024 * XMod;
00352		YPos = 520.0/768 * YMod;
00353		XWidth = 256.0/1024 * XMod;
00354		YHeight = 64.0/768 * YMod;
00355		FaceButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00356		FaceButton.NotifyWindow = Self;
00357		FaceButton.Text = FaceDescs[PreferredFace];
00358		TextColor.R = 255;
00359		TextColor.G = 255;
00360		TextColor.B = 0;
00361		FaceButton.SetTextColor(TextColor);
00362		FaceButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00363		FaceButton.bStretched = True;
00364		FaceButton.UpTexture = Texture(DynamicLoadObject("UTMenu.Plate3Plain", Class'Texture'));
00365		FaceButton.DownTexture = Texture(DynamicLoadObject("UTMenu.PlateYellow2", Class'Texture'));
00366		FaceButton.OverTexture = Texture(DynamicLoadObject("UTMenu.Plate2", Class'Texture'));
00367		FaceButton.bDontSetLabel = True;
00368		FaceButton.LabelWidth = 178.0/1024 * XMod;
00369		FaceButton.LabelHeight = 49.0/768 * YMod;
00370		FaceButton.bIgnoreLDoubleclick = True;
00371		FaceButton.OverSound = sound'LadderSounds.lcursorMove';
00372		FaceButton.DownSound = sound'SpeechWindowClick';
00373	
00374		// Skill Label
00375		XPos = 164.0/1024 * XMod;
00376		YPos = 563.0/768 * YMod;
00377		XWidth = 256.0/1024 * XMod;
00378		YHeight = 64.0/768 * YMod;
00379		SkillLabel = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00380		SkillLabel.NotifyWindow = Self;
00381		SkillLabel.Text = SkillsText;
00382		TextColor.R = 255;
00383		TextColor.G = 255;
00384		TextColor.B = 0;
00385		SkillLabel.SetTextColor(TextColor);
00386		SkillLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00387		SkillLabel.bStretched = True;
00388		SkillLabel.bDisabled = True;
00389		SkillLabel.bDontSetLabel = True;
00390		SkillLabel.LabelWidth = 178.0/1024 * XMod;
00391		SkillLabel.LabelHeight = 49.0/768 * YMod;
00392	
00393		// Skill Button
00394		XPos = 164.0/1024 * XMod;
00395		YPos = 595.0/768 * YMod;
00396		XWidth = 256.0/1024 * XMod;
00397		YHeight = 64.0/768 * YMod;
00398		SkillButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00399		SkillButton.NotifyWindow = Self;
00400		SkillButton.Text = SkillText[1];
00401		CurrentSkill = 1;
00402		TextColor.R = 255;
00403		TextColor.G = 255;
00404		TextColor.B = 0;
00405		SkillButton.SetTextColor(TextColor);
00406		SkillButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00407		SkillButton.bStretched = True;
00408		SkillButton.UpTexture = Texture(DynamicLoadObject("UTMenu.Plate3Plain", Class'Texture'));
00409		SkillButton.DownTexture = Texture(DynamicLoadObject("UTMenu.PlateYellow2", Class'Texture'));
00410		SkillButton.OverTexture = Texture(DynamicLoadObject("UTMenu.Plate2", Class'Texture'));
00411		SkillButton.bDontSetLabel = True;
00412		SkillButton.LabelWidth = 178.0/1024 * XMod;
00413		SkillButton.LabelHeight = 49.0/768 * YMod;
00414		SkillButton.bIgnoreLDoubleclick = True;
00415		CurrentSkill = PreferredSkill;
00416		SkillButton.Text = SkillText[CurrentSkill];
00417		LadderObj.TournamentDifficulty = CurrentSkill;
00418		LadderObj.SkillText = SkillText[LadderObj.TournamentDifficulty];
00419		SkillButton.OverSound = sound'LadderSounds.lcursorMove';
00420		SkillButton.DownSound = sound'SpeechWindowClick';
00421	
00422		// Title Button
00423		XPos = 84.0/1024 * XMod;
00424		YPos = 69.0/768 * YMod;
00425		XWidth = 342.0/1024 * XMod;
00426		YHeight = 41.0/768 * YMod;
00427		TitleButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00428		TitleButton.NotifyWindow = Self;
00429		TitleButton.Text = CCText;
00430		TextColor.R = 255;
00431		TextColor.G = 255;
00432		TextColor.B = 0;
00433		TitleButton.SetTextColor(TextColor);
00434		TitleButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetHugeFont(Root);
00435		TitleButton.bStretched = True;
00436	
00437		// Back Button
00438		XPos = 192.0/1024 * XMod;
00439		YPos = 701.0/768 * YMod;
00440		XWidth = 64.0/1024 * XMod;
00441		YHeight = 64.0/768 * YMod;
00442		BackButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00443		BackButton.DisabledTexture = Texture(DynamicLoadObject("UTMenu.LeftUp", Class'Texture'));
00444		BackButton.UpTexture = Texture(DynamicLoadObject("UTMenu.LeftUp", Class'Texture'));
00445		BackButton.DownTexture = Texture(DynamicLoadObject("UTMenu.LeftDown", Class'Texture'));
00446		BackButton.OverTexture = Texture(DynamicLoadObject("UTMenu.LeftOver", Class'Texture'));
00447		BackButton.NotifyWindow = Self;
00448		BackButton.Text = "";
00449		TextColor.R = 255;
00450		TextColor.G = 255;
00451		TextColor.B = 0;
00452		BackButton.SetTextColor(TextColor);
00453		BackButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00454		BackButton.bStretched = True;
00455		BackButton.OverSound = sound'LadderSounds.lcursorMove';
00456		BackButton.DownSound = sound'LadderSounds.ladvance';
00457	
00458		// Next Button
00459		XPos = 256.0/1024 * XMod;
00460		YPos = 701.0/768 * YMod;
00461		XWidth = 64.0/1024 * XMod;
00462		YHeight = 64.0/768 * YMod;
00463		NextButton = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00464		NextButton.DisabledTexture = Texture(DynamicLoadObject("UTMenu.RightUp", Class'Texture'));
00465		NextButton.UpTexture = Texture(DynamicLoadObject("UTMenu.RightUp", Class'Texture'));
00466		NextButton.DownTexture = Texture(DynamicLoadObject("UTMenu.RightDown", Class'Texture'));
00467		NextButton.OverTexture = Texture(DynamicLoadObject("UTMenu.RightOver", Class'Texture'));
00468		NextButton.NotifyWindow = Self;
00469		NextButton.Text = "";
00470		TextColor.R = 255;
00471		TextColor.G = 255;
00472		TextColor.B = 0;
00473		NextButton.SetTextColor(TextColor);
00474		NextButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00475		NextButton.bStretched = True;
00476		NextButton.OverSound = sound'LadderSounds.lcursorMove';
00477		NextButton.DownSound = sound'LadderSounds.ladvance';
00478	
00479		// Team Desc
00480		XPos = 609.0/1024 * XMod;
00481		YPos = 388.0/768 * YMod;
00482		XWidth = 321.0/1024 * XMod;
00483		YHeight = 113.0/768 * YMod;
00484		TeamDescArea = UTFadeTextArea(CreateWindow(Class<UWindowWindow>(DynamicLoadObject("UTMenu.UTFadeTextArea", Class'Class')), XPos, YPos, XWidth, YHeight));
00485		TeamDescArea.TextColor.R = 255;
00486		TeamDescArea.TextColor.G = 255;
00487		TeamDescArea.TextColor.B = 0;
00488		TeamDescArea.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetSmallFont(Root);
00489		TeamDescArea.bAlwaysOnTop = True;
00490		TeamDescArea.bMousePassThrough = True;
00491		TeamDescArea.bAutoScrolling = True;
00492		TeamDescArea.Clear();
00493		TeamDescArea.AddText(TeamNameString@LadderObj.Team.Static.GetTeamName());
00494		TeamDescArea.AddText(" ");
00495		TeamDescArea.AddText(LadderObj.Team.Static.GetTeamBio());
00496	
00497		// DescScrollup
00498		XPos = 715.0/1024 * XMod;
00499		YPos = 538.0/768 * YMod;
00500		XWidth = 32.0/1024 * XMod;
00501		YHeight = 16.0/768 * YMod;
00502		DescScrollup = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00503		DescScrollup.NotifyWindow = Self;
00504		DescScrollup.Text = "";
00505		DescScrollup.bStretched = True;
00506		DescScrollup.UpTexture = Texture(DynamicLoadObject("UTMenu.AroUup", Class'Texture'));
00507		DescScrollup.OverTexture = Texture(DynamicLoadObject("UTMenu.AroUovr", Class'Texture'));
00508		DescScrollup.DownTexture = Texture(DynamicLoadObject("UTMenu.AroUdwn", Class'Texture'));
00509		DescScrollup.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetSmallFont(Root);
00510		DescScrollup.bAlwaysOnTop = True;
00511	
00512		// DescScrolldown
00513		XPos = 799.0/1024 * XMod;
00514		YPos = 538.0/768 * YMod;
00515		XWidth = 32.0/1024 * XMod;
00516		YHeight = 16.0/768 * YMod;
00517		DescScrolldown = NotifyButton(CreateWindow(class'NotifyButton', XPos, YPos, XWidth, YHeight));
00518		DescScrolldown.NotifyWindow = Self;
00519		DescScrolldown.Text = "";
00520		DescScrolldown.bStretched = True;
00521		DescScrolldown.UpTexture = Texture(DynamicLoadObject("UTMenu.AroDup", Class'Texture'));
00522		DescScrolldown.OverTexture = Texture(DynamicLoadObject("UTMenu.AroDovr", Class'Texture'));
00523		DescScrolldown.DownTexture = Texture(DynamicLoadObject("UTMenu.AroDdwn", Class'Texture'));
00524		DescScrolldown.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetSmallFont(Root);
00525		DescScrolldown.bAlwaysOnTop = True;
00526	
00527		if (PreferredSex == 1)
00528		{
00529			LadderObj.Sex = "F";
00530			SexButton.Text = MaleText;
00531		} else {
00532			LadderObj.Sex = "M";
00533			SexButton.Text = FemaleText;
00534		}
00535		SexPressed();
00536	
00537		Initialized = True;
00538		Root.Console.bBlackout = True;
00539	}
00540	
00541	function BeforePaint(Canvas C, float X, float Y)
00542	{
00543		local int i;
00544		local int W, H;
00545		local float XWidth, YHeight, XMod, YMod, XPos, YPos;
00546	
00547		Super.BeforePaint(C, X, Y);
00548	
00549		class'UTLadderStub'.Static.GetStubClass().Static.SetupWinParams(Self, Root, W, H);
00550	
00551		XMod = 4*W;
00552		YMod = 3*H;
00553	
00554		// Mesh View
00555		XPos = 608.0/1024 * XMod;
00556		YPos = 88.0/768 * YMod;
00557		XWidth = 323.0/1024 * XMod;
00558		YHeight = 466.0/768 * YMod;
00559		MeshWindow.SetSize(XWidth, YHeight);
00560		MeshWindow.WinLeft = XPos;
00561		MeshWindow.WinTop = YPos;
00562	
00563		// Name Label
00564		XPos = 164.0/1024 * XMod;
00565		YPos = 263.0/768 * YMod;
00566		XWidth = 256.0/1024 * XMod;
00567		YHeight = 64.0/768 * YMod;
00568		NameLabel.SetSize(XWidth, YHeight);
00569		NameLabel.WinLeft = XPos;
00570		NameLabel.WinTop = YPos;
00571		NameLabel.LabelWidth = 178/1024 * XMod;
00572		NameLabel.LabelHeight = 49/768 * YMod;
00573		NameLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00574	
00575		// Name Button
00576		XPos = 164.0/1024 * XMod;
00577		YPos = 295.0/768 * YMod;
00578		XWidth = 256.0/1024 * XMod;
00579		YHeight = 64.0/768 * YMod;
00580		NameButton.SetSize(XWidth, YHeight);
00581		NameButton.WinLeft = XPos;
00582		NameButton.WinTop = YPos;
00583		NameButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00584	
00585		// Name Edit
00586		XPos = 164.0/1024 * XMod;
00587		YPos = 295.0/768 * YMod;
00588		XWidth = 178.0/1024 * XMod;
00589		YHeight = 49.0/768 * YMod;
00590		NameEdit.SetSize(XWidth, YHeight);
00591		NameEdit.WinLeft = XPos;
00592		NameEdit.WinTop = YPos;
00593	
00594		// Sex Label
00595		XPos = 164.0/1024 * XMod;
00596		YPos = 338.0/768 * YMod;
00597		XWidth = 256.0/1024 * XMod;
00598		YHeight = 64.0/768 * YMod;
00599		SexLabel.SetSize(XWidth, YHeight);
00600		SexLabel.WinLeft = XPos;
00601		SexLabel.WinTop = YPos;
00602		SexLabel.LabelWidth = 178.0/1024 * XMod;
00603		SexLabel.LabelHeight = 49.0/768 * YMod;
00604		SexLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00605	
00606		// Sex Button
00607		XPos = 164.0/1024 * XMod;
00608		YPos = 370.0/768 * YMod;
00609		XWidth = 256.0/1024 * XMod;
00610		YHeight = 64.0/768 * YMod;
00611		SexButton.SetSize(XWidth, YHeight);
00612		SexButton.WinLeft = XPos;
00613		SexButton.WinTop = YPos;
00614		SexButton.LabelWidth = 178.0/1024 * XMod;
00615		SexButton.LabelHeight = 52.0/768 * YMod;
00616		SexButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00617	
00618		// Team Label
00619		XPos = 164.0/1024 * XMod;
00620		YPos = 413.0/768 * YMod;
00621		XWidth = 256.0/1024 * XMod;
00622		YHeight = 64.0/768 * YMod;
00623		TeamLabel.SetSize(XWidth, YHeight);
00624		TeamLabel.WinLeft = XPos;
00625		TeamLabel.WinTop = YPos;
00626		TeamLabel.LabelWidth = 178.0/1024 * XMod;
00627		TeamLabel.LabelHeight = 49.0/768 * YMod;
00628		TeamLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00629	
00630		// Team Button
00631		XPos = 164.0/1024 * XMod;
00632		YPos = 445.0/768 * YMod;
00633		XWidth = 256.0/1024 * XMod;
00634		YHeight = 64.0/768 * YMod;
00635		TeamButton.SetSize(XWidth, YHeight);
00636		TeamButton.WinLeft = XPos;
00637		TeamButton.WinTop = YPos;
00638		TeamButton.LabelWidth = 178/1024 * XMod;
00639		TeamButton.LabelHeight = 49/768 * YMod;
00640		TeamButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00641	
00642		// Face Label
00643		XPos = 164.0/1024 * XMod;
00644		YPos = 488.0/768 * YMod;
00645		XWidth = 256.0/1024 * XMod;
00646		YHeight = 64.0/768 * YMod;
00647		FaceLabel.SetSize(XWidth, YHeight);
00648		FaceLabel.WinLeft = XPos;
00649		FaceLabel.WinTop = YPos;
00650		FaceLabel.LabelWidth = 178/1024 * XMod;
00651		FaceLabel.LabelHeight = 49/768 * YMod;
00652		FaceLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00653	
00654		// Face Button
00655		XPos = 164.0/1024 * XMod;
00656		YPos = 520.0/768 * YMod;
00657		XWidth = 256.0/1024 * XMod;
00658		YHeight = 64.0/768 * YMod;
00659		FaceButton.SetSize(XWidth, YHeight);
00660		FaceButton.WinLeft = XPos;
00661		FaceButton.WinTop = YPos;
00662		FaceButton.LabelWidth = 178/1024 * XMod;
00663		FaceButton.LabelHeight = 49/768 * YMod;
00664		FaceButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00665	
00666		// Skill Label
00667		XPos = 164.0/1024 * XMod;
00668		YPos = 563.0/768 * YMod;
00669		XWidth = 256.0/1024 * XMod;
00670		YHeight = 64.0/768 * YMod;
00671		SkillLabel.SetSize(XWidth, YHeight);
00672		SkillLabel.WinLeft = XPos;
00673		SkillLabel.WinTop = YPos;
00674		SkillLabel.LabelWidth = 178/1024 * XMod;
00675		SkillLabel.LabelHeight = 49/768 * YMod;
00676		SkillLabel.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00677	
00678		// Skill Button
00679		XPos = 164.0/1024 * XMod;
00680		YPos = 595.0/768 * YMod;
00681		XWidth = 256.0/1024 * XMod;
00682		YHeight = 64.0/768 * YMod;
00683		SkillButton.SetSize(XWidth, YHeight);
00684		SkillButton.WinLeft = XPos;
00685		SkillButton.WinTop = YPos;
00686		SkillButton.LabelWidth = 178/1024 * XMod;
00687		SkillButton.LabelHeight = 49/768 * YMod;
00688		SkillButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root);
00689	
00690		// Title Button
00691		XPos = 84.0/1024 * XMod;
00692		YPos = 69.0/768 * YMod;
00693		XWidth = 342.0/1024 * XMod;
00694		YHeight = 41.0/768 * YMod;
00695		TitleButton.SetSize(XWidth, YHeight);
00696		TitleButton.WinLeft = XPos;
00697		TitleButton.WinTop = YPos;
00698		TitleButton.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetHugeFont(Root);
00699	
00700		// Back Button
00701		XPos = 192.0/1024 * XMod;
00702		YPos = 701.0/768 * YMod;
00703		XWidth = 64.0/1024 * XMod;
00704		YHeight = 64.0/768 * YMod;
00705		BackButton.SetSize(XWidth, YHeight);
00706		BackButton.WinLeft = XPos;
00707		BackButton.WinTop = YPos;
00708	
00709		// Next Button
00710		XPos = 256.0/1024 * XMod;
00711		YPos = 701.0/768 * YMod;
00712		XWidth = 64.0/1024 * XMod;
00713		YHeight = 64.0/768 * YMod;
00714		NextButton.SetSize(XWidth, YHeight);
00715		NextButton.WinLeft = XPos;
00716		NextButton.WinTop = YPos;
00717	
00718		// Team Desc
00719		XPos = 609.0/1024 * XMod;
00720		YPos = 388.0/768 * YMod;
00721		XWidth = 321.0/1024 * XMod;
00722		YHeight = 113.0/768 * YMod;
00723		TeamDescArea.SetSize(XWidth, YHeight);
00724		TeamDescArea.WinLeft = XPos;
00725		TeamDescArea.WinTop = YPos;
00726		TeamDescArea.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetSmallFont(Root);
00727	
00728		// DescScrollup
00729		XPos = 715.0/1024 * XMod;
00730		YPos = 538.0/768 * YMod;
00731		XWidth = 32.0/1024 * XMod;
00732		YHeight = 16.0/768 * YMod;
00733		DescScrollup.WinLeft = XPos;
00734		DescScrollup.WinTop = YPos;
00735		DescScrollup.SetSize(XWidth, YHeight);
00736	
00737		// DescScrolldown
00738		XPos = 799.0/1024 * XMod;
00739		YPos = 538.0/768 * YMod;
00740		XWidth = 32.0/1024 * XMod;
00741		YHeight = 16.0/768 * YMod;
00742		DescScrolldown.WinLeft = XPos;
00743		DescScrolldown.WinTop = YPos;
00744		DescScrolldown.SetSize(XWidth, YHeight);
00745	}
00746	
00747	function Tick(float Delta)
00748	{
00749		Super.Tick(Delta);
00750	
00751		FlashTime += Delta;
00752		if (FlashTime > 1)
00753		{
00754			FlashTime = 0;
00755			if (bFlashOn)
00756			{
00757				NextButton.UpTexture = Texture(DynamicLoadObject("UTMenu.RightUp", Class'Texture'));
00758				bFlashOn = False;
00759			} else {
00760				NextButton.UpTexture = Texture(DynamicLoadObject("UTMenu.RightOver", Class'Texture'));
00761				bFlashOn = True;
00762			}
00763		}
00764	}
00765	
00766	function Paint(Canvas C, float X, float Y)
00767	{
00768		local int XOffset, YOffset;
00769		local int W, H;
00770		local float XWidth, YHeight, XMod, YMod, XPos, YPos;
00771	
00772		class'UTLadderStub'.Static.GetStubClass().Static.SetupWinParams(Self, Root, W, H);
00773	
00774		XMod = 4*W;
00775		YMod = 3*H;
00776	
00777		XOffset = (WinWidth - (4 * W)) / 2;
00778		YOffset = (WinHeight - (3 * H)) / 2;
00779	
00780		// Background
00781		DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (0 * H), W+1, H+1, BG1[0]);
00782		DrawStretchedTexture(C, XOffset + (1 * W), YOffset + (0 * H), W+1, H+1, BG1[1]);
00783		DrawStretchedTexture(C, XOffset + (2 * W), YOffset + (0 * H), W+1, H+1, BG1[2]);
00784		DrawStretchedTexture(C, XOffset + (3 * W), YOffset + (0 * H), W+1, H+1, BG1[3]);
00785	
00786		DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (1 * H), W+1, H+1, BG2[0]);
00787		DrawStretchedTexture(C, XOffset + (1 * W), YOffset + (1 * H), W+1, H+1, BG2[1]);
00788		DrawStretchedTexture(C, XOffset + (2 * W), YOffset + (1 * H), W+1, H+1, BG2[2]);
00789		DrawStretchedTexture(C, XOffset + (3 * W), YOffset + (1 * H), W+1, H+1, BG2[3]);
00790			
00791		DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (2 * H), W+1, H+1, BG3[0]);
00792		DrawStretchedTexture(C, XOffset + (1 * W), YOffset + (2 * H), W+1, H+1, BG3[1]);
00793		DrawStretchedTexture(C, XOffset + (2 * W), YOffset + (2 * H), W+1, H+1, BG3[2]);
00794		DrawStretchedTexture(C, XOffset + (3 * W), YOffset + (2 * H), W+1, H+1, BG3[3]);
00795	
00796		if (Root.WinWidth > 500)
00797		{
00798			DrawStretchedTexture(C, XOffset + (0 * W), YOffset + (0 * H), (W+1)/2, (H+1)/2, texture'TeamPlate');
00799			DrawStretchedTexture(C, XOffset + (0 * W) + (65.0/1024*XMod), YOffset + (0 * H) + (61.0/768*YMod), (58.0/1024*XMod), (57.0/768*YMod), class'Ladder'.Default.LadderTeams[PreferredTeam].Default.TeamSymbol);
00800		}
00801	}
00802	
00803	function Notify(UWindowWindow B, byte E)
00804	{
00805		switch (E)
00806		{
00807			case DE_DoubleClick:
00808			case DE_Click:
00809				switch (B)
00810				{
00811					case SexButton:
00812						SexPressed();
00813						break;
00814					case TeamButton:
00815						TeamPressed();
00816						break;
00817					case FaceButton:
00818						FacePressed();
00819						break;
00820					case SkillButton:
00821						SkillPressed();
00822						break;
00823					case NextButton:
00824						NextPressed();
00825						break;
00826					case BackButton:
00827						BackPressed();
00828						break;
00829					case DescScrollup:
00830						TeamDescArea.ScrollingOffset--;
00831						if (TeamDescArea.ScrollingOffset < 0)
00832							TeamDescArea.ScrollingOffset = 0;
00833						break;
00834					case DescScrolldown:
00835						TeamDescArea.ScrollingOffset++;
00836						if (TeamDescArea.ScrollingOffset > 10)
00837							TeamDescArea.ScrollingOffset = 10;
00838						break;
00839				}
00840				break;
00841			case DE_Change:
00842				switch (B)
00843				{
00844					case NameEdit:
00845						NameChanged();
00846						break;
00847				}
00848				break;
00849		}
00850	}
00851	
00852	function NameChanged()
00853	{
00854		local string N;
00855		if (Initialized)
00856		{
00857			Initialized = False;
00858			N = NameEdit.GetValue();
00859			ReplaceText(N, " ", "_");
00860			NameEdit.SetValue(N);
00861			Initialized = True;
00862	
00863			GetPlayerOwner().ChangeName(NameEdit.GetValue());
00864			GetPlayerOwner().UpdateURL("Name", NameEdit.GetValue(), True);
00865		}
00866	}
00867	
00868	function SexPressed()
00869	{
00870		local int CurrentSex;
00871		local string MeshName;
00872	
00873		if (SexButton.Text ~= MaleText)
00874		{
00875			PreferredSex = 0;
00876			LadderObj.Sex = "M";
00877			if (FemaleClass == None)
00878				return;
00879	
00880			SexButton.Text = FemaleText;
00881	
00882			IterateFaces(FemaleSkin, GetPlayerOwner().GetItemName(string(FemaleClass.Default.Mesh)));
00883	
00884			// Make player female.
00885			MeshName = FemaleClass.Default.SelectionMesh;
00886			MeshWindow.SetMeshString(MeshName);
00887			FemaleClass.static.SetMultiSkin(MeshWindow.MeshActor, FemaleSkin, Faces[PreferredFace], 255);
00888			GetPlayerOwner().UpdateURL("Class", "Botpack."$string(FemaleClass.Name), True);
00889			GetPlayerOwner().UpdateURL("Skin", FemaleSkin, True);
00890			GetPlayerOwner().UpdateURL("Voice", FemaleClass.Default.VoiceType, True);
00891			CurrentSex = 1;
00892			GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00893	
00894			FaceButton.Text = FaceDescs[PreferredFace];
00895	
00896			LadderObj.Sex = "F";
00897		} else {
00898			PreferredSex = 1;
00899			LadderObj.Sex = "F";
00900			if (MaleClass == None)
00901				return;
00902	
00903			SexButton.Text = MaleText;
00904	
00905			IterateFaces(MaleSkin, GetPlayerOwner().GetItemName(string(MaleClass.Default.Mesh)));
00906	
00907			// Make player male.
00908			MeshName = MaleClass.Default.SelectionMesh;
00909			MeshWindow.SetMeshString(MeshName);
00910			MaleClass.static.SetMultiSkin(MeshWindow.MeshActor, MaleSkin, Faces[PreferredFace], 255);
00911			GetPlayerOwner().UpdateURL("Class", "Botpack."$string(MaleClass.Name), True);
00912			GetPlayerOwner().UpdateURL("Skin", MaleSkin, True);
00913			GetPlayerOwner().UpdateURL("Voice", MaleClass.Default.VoiceType, True);
00914			GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00915			CurrentSex = 0;
00916	
00917			FaceButton.Text = FaceDescs[PreferredFace];
00918	
00919			LadderObj.Sex = "M";
00920		}
00921		PreferredSex = CurrentSex;
00922		SaveConfig();
00923	}
00924	
00925	function FacePressed()
00926	{
00927		PreferredFace++;
00928		if (Faces[PreferredFace] == "")
00929			PreferredFace = 0;
00930		FaceButton.Text = FaceDescs[PreferredFace];
00931		if (SexButton.Text ~= MaleText)
00932		{
00933			MaleClass.static.SetMultiSkin(MeshWindow.MeshActor, MaleSkin, Faces[PreferredFace], 255);
00934			GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00935		} else {
00936			FemaleClass.static.SetMultiSkin(MeshWindow.MeshActor, FemaleSkin, Faces[PreferredFace], 255);
00937			GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00938		}
00939	
00940		LadderObj.Face = PreferredFace;
00941		SaveConfig();
00942	}
00943	
00944	function TeamPressed()
00945	{
00946		local string MeshName;
00947	
00948		if (!class'UTLadderStub'.Static.GetStubClass().Static.IsDemo())
00949		{
00950			PreferredTeam++;
00951			if (PreferredTeam == class'Ladder'.Default.NumTeams)
00952				PreferredTeam = 0;
00953		}
00954		TeamButton.Text = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.TeamName;
00955		LadderObj.Team = class'Ladder'.Default.LadderTeams[PreferredTeam];
00956	
00957		// Update mesh
00958		MaleClass = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.MaleClass;
00959		MaleSkin = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.MaleSkin;
00960		FemaleClass = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.FemaleClass;
00961		FemaleSkin = class'Ladder'.Default.LadderTeams[PreferredTeam].Default.FemaleSkin;
00962	
00963		if ((MaleClass == None) && (SexButton.Text ~= MaleText))
00964			TeamPressed();
00965		if ((FemaleClass == None) && (SexButton.Text ~= FemaleText))
00966			TeamPressed();
00967	
00968		if (SexButton.Text ~= MaleText)
00969		{
00970			IterateFaces(MaleSkin, GetPlayerOwner().GetItemName(string(MaleClass.Default.Mesh)));
00971	
00972			PreferredFace = 0;
00973	
00974			MeshName = MaleClass.Default.SelectionMesh;
00975			MeshWindow.SetMeshString(MeshName);
00976			MaleClass.static.SetMultiSkin(MeshWindow.MeshActor, MaleSkin, Faces[PreferredFace], 255);
00977			GetPlayerOwner().UpdateURL("Class", string(MaleClass), True);
00978			GetPlayerOwner().UpdateURL("Voice", MaleClass.Default.VoiceType, True);
00979			GetPlayerOwner().UpdateURL("Skin", MaleSkin, True);
00980			GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00981	
00982			FaceButton.Text = FaceDescs[PreferredFace];
00983			SexButton.Text = MaleText;
00984			PreferredSex = 0;
00985			LadderObj.Sex = "M";
00986		} else {
00987			IterateFaces(FemaleSkin, GetPlayerOwner().GetItemName(string(FemaleClass.Default.Mesh)));
00988	
00989			PreferredFace = 0;
00990	
00991			MeshName = FemaleClass.Default.SelectionMesh;
00992			MeshWindow.SetMeshString(MeshName);
00993			FemaleClass.static.SetMultiSkin(MeshWindow.MeshActor, FemaleSkin, Faces[PreferredFace], 255);
00994			GetPlayerOwner().UpdateURL("Class", string(FemaleClass), True);
00995			GetPlayerOwner().UpdateURL("Voice", FemaleClass.Default.VoiceType, True);
00996			GetPlayerOwner().UpdateURL("Skin", FemaleSkin, True);
00997			GetPlayerOwner().UpdateURL("Face", Faces[PreferredFace], True);
00998	
00999			FaceButton.Text = FaceDescs[PreferredFace];
01000			SexButton.Text = FemaleText;
01001			PreferredSex = 1;
01002			LadderObj.Sex = "F";
01003		}
01004	
01005		TeamDescArea.Clear();
01006		TeamDescArea.AddText(TeamNameString@LadderObj.Team.Static.GetTeamName());
01007		TeamDescArea.AddText(" ");
01008		TeamDescArea.AddText(LadderObj.Team.Static.GetTeamBio());
01009	
01010		SaveConfig();
01011	}
01012	
01013	function SkillPressed()
01014	{
01015		CurrentSkill++;
01016		if (CurrentSkill == 8)
01017			CurrentSkill = 0;
01018		SkillButton.Text = SkillText[CurrentSkill];
01019		LadderObj.TournamentDifficulty = CurrentSkill;
01020		LadderObj.SkillText = SkillText[LadderObj.TournamentDifficulty];
01021		PreferredSkill = CurrentSkill;
01022		SaveConfig();
01023	}
01024	
01025	function BackPressed()
01026	{
01027		Close();
01028	}
01029	
01030	function NextPressed()
01031	{
01032		local int i;
01033		local ManagerWindow ManagerWindow;
01034	
01035		if (LadderObj.Sex ~= "F")
01036		{
01037			SexButton.Text = MaleText;
01038		} else {
01039			SexButton.Text = FemaleText;
01040		}
01041		SexPressed();
01042	
01043		// Go to the ladder selection screen.
01044		LadderObj.DMRank = 0;
01045		LadderObj.DMPosition = -1;
01046		LadderObj.CTFRank = 0;
01047		LadderObj.CTFPosition = -1;
01048		LadderObj.DOMRank = 0;
01049		LadderObj.DOMPosition = -1;
01050		LadderObj.ASRank = 0;
01051		LadderObj.ASPosition = -1;
01052		LadderObj.ChalRank = 0;
01053		LadderObj.ChalPosition = 0;
01054	
01055		LadderObj = None;
01056		Super.Close();
01057		ManagerWindow = ManagerWindow(Root.CreateWindow(class'ManagerWindow', 100, 100, 200, 200, Root, True));
01058	}
01059	
01060	function Close(optional bool bByParent)
01061	{
01062		LadderObj = None;
01063		Root.Console.bNoDrawWorld = Root.Console.ShowDesktop;
01064		Root.Console.bLocked = False;
01065		UMenuRootWindow(Root).MenuBar.ShowWindow();
01066	
01067		Super.Close(bByParent);
01068	}
01069	
01070	function HideWindow()
01071	{
01072		Root.Console.bBlackOut = False;
01073	
01074		Super.HideWindow();
01075	}
01076	
01077	function IterateFaces(string InSkinName, string MeshName)
01078	{
01079		local string SkinName, SkinDesc, TestName, Temp, FaceName;
01080		local bool bNewFormat;
01081		local int i, Pos;
01082	
01083		for (i=0; i<16; i++)
01084		{
01085			FaceDescs[i] = "";
01086			Faces[i] = "";
01087		}
01088	
01089		i = 0;
01090	
01091		SkinName = "None";
01092		TestName = "";
01093		while ( True )
01094		{
01095			GetPlayerOwner().GetNextSkin(MeshName, SkinName, 1, SkinName, SkinDesc);
01096	
01097			if( SkinName == TestName )
01098				break;
01099	
01100			if( TestName == "" )
01101				TestName = SkinName;
01102	
01103			// Multiskin format
01104			if( SkinDesc != "")
01105			{			
01106				Temp = GetPlayerOwner().GetItemName(SkinName);
01107				if(Mid(Temp, 5) != "" && Left(Temp, 4) == GetPlayerOwner().GetItemName(InSkinName))
01108				{
01109					Pos = InStr(SkinName, ".");
01110					FaceDescs[i] = SkinDesc;
01111					Faces[i++] = Left(SkinName, Pos+1)$Mid(Temp, 5);
01112				}
01113			}
01114		}
01115	}
01116	
01117	defaultproperties
01118	{
01119	     BGName1(0)="UTMenu.CC11"
01120	     BGName1(1)="UTMenu.CC12"
01121	     BGName1(2)="UTMenu.CC13"
01122	     BGName1(3)="UTMenu.CC14"
01123	     BGName2(0)="UTMenu.CC21"
01124	     BGName2(1)="UTMenu.CC22"
01125	     BGName2(2)="UTMenu.CC23"
01126	     BGName2(3)="UTMenu.CC24"
01127	     BGName3(0)="UTMenu.CC31"
01128	     BGName3(1)="UTMenu.CC32"
01129	     BGName3(2)="UTMenu.CC33"
01130	     BGName3(3)="UTMenu.CC34"
01131	     NameText="Name"
01132	     SexText="Gender"
01133	     MaleText="Male"
01134	     FemaleText="Female"
01135	     TeamText="Team"
01136	     FaceText="Face"
01137	     SkillsText="Skill"
01138	     SkillText(0)="Novice"
01139	     SkillText(1)="Average"
01140	     SkillText(2)="Experienced"
01141	     SkillText(3)="Skilled"
01142	     SkillText(4)="Adept"
01143	     SkillText(5)="Masterful"
01144	     SkillText(6)="Inhuman"
01145	     SkillText(7)="Godlike"
01146	     CCText="   Character Creation"
01147	     TeamNameString="Team Name:"
01148	     PreferredSkill=1
01149	}

End Source Code