Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowFramedWindow | +--UMenu.UMenuFramedWindow | +--UMenu.UMenuPlayerWindow
UWindowSmallCloseButton
CloseButton
void
Created()
Paint(Canvas C, float X, float Y)
Resized()
ResolutionChanged(float W, float H)
SaveConfigs()
SetSizePos()
00001 class UMenuPlayerWindow extends UMenuFramedWindow; 00002 00003 var UWindowSmallCloseButton CloseButton; 00004 00005 function Created() 00006 { 00007 bStatusBar = False; 00008 bSizable = True; 00009 00010 Super.Created(); 00011 00012 CloseButton = UWindowSmallCloseButton(CreateWindow(class'UWindowSmallCloseButton', WinWidth-56, WinHeight-24, 48, 16)); 00013 00014 SetSizePos(); 00015 } 00016 00017 function ResolutionChanged(float W, float H) 00018 { 00019 SetSizePos(); 00020 Super.ResolutionChanged(W, H); 00021 } 00022 00023 function SetSizePos() 00024 { 00025 if(Root.WinHeight < 400) 00026 SetSize(Root.WinWidth - 10, Root.WinHeight - 32); 00027 else 00028 SetSize(Max(450, Root.WinWidth - 150), Root.WinHeight - 50); 00029 00030 WinLeft = Root.WinWidth/2 - WinWidth/2; 00031 WinTop = Root.WinHeight/2 - WinHeight/2; 00032 } 00033 00034 function Resized() 00035 { 00036 Super.Resized(); 00037 ClientArea.SetSize(ClientArea.WinWidth, ClientArea.WinHeight-24); 00038 CloseButton.WinLeft = ClientArea.WinLeft+ClientArea.WinWidth-52; 00039 CloseButton.WinTop = ClientArea.WinTop+ClientArea.WinHeight+4; 00040 } 00041 00042 function Paint(Canvas C, float X, float Y) 00043 { 00044 local Texture T; 00045 00046 T = GetLookAndFeelTexture(); 00047 DrawUpBevel( C, ClientArea.WinLeft, ClientArea.WinTop + ClientArea.WinHeight, ClientArea.WinWidth, 24, T); 00048 00049 Super.Paint(C, X, Y); 00050 } 00051 00052 function SaveConfigs() 00053 { 00054 GetPlayerOwner().SaveConfig(); 00055 } 00056 00057 defaultproperties 00058 { 00059 ClientClass=Class'UMenu.UMenuPlayerClientWindow' 00060 WindowTitle="Player Setup" 00061 }