Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowFramedWindow | +--UMenu.UMenuFramedWindow | +--UMenu.UMenuWeaponPriorityWindow
UWindowSmallCloseButton
CloseButton
void
Created()
Paint(Canvas C, float X, float Y)
Resized()
ResolutionChanged(float W, float H)
SaveConfigs()
SetSizePos()
00001 class UMenuWeaponPriorityWindow expands 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 MinWinWidth = 300; 00017 MinWinHeight = 170; 00018 } 00019 00020 function ResolutionChanged(float W, float H) 00021 { 00022 SetSizePos(); 00023 Super.ResolutionChanged(W, H); 00024 } 00025 00026 function SetSizePos() 00027 { 00028 SetSize(Min(480, Root.WinWidth - 50), Min(360, Root.WinHeight - 50)); 00029 WinLeft = Root.WinWidth/2 - WinWidth/2; 00030 WinTop = Root.WinHeight/2 - WinHeight/2; 00031 } 00032 00033 function Resized() 00034 { 00035 Super.Resized(); 00036 ClientArea.SetSize(ClientArea.WinWidth, ClientArea.WinHeight-24); 00037 CloseButton.WinLeft = ClientArea.WinLeft+ClientArea.WinWidth-52; 00038 CloseButton.WinTop = ClientArea.WinTop+ClientArea.WinHeight+4; 00039 } 00040 00041 function Paint(Canvas C, float X, float Y) 00042 { 00043 local Texture T; 00044 00045 T = GetLookAndFeelTexture(); 00046 DrawUpBevel( C, ClientArea.WinLeft, ClientArea.WinTop + ClientArea.WinHeight, ClientArea.WinWidth, 24, T); 00047 00048 Super.Paint(C, X, Y); 00049 } 00050 00051 function SaveConfigs() 00052 { 00053 Super.SaveConfigs(); 00054 GetPlayerOwner().SaveConfig(); 00055 } 00056 00057 defaultproperties 00058 { 00059 ClientClass=Class'UMenu.UMenuWeaponPriorityCW' 00060 WindowTitle="Weapons" 00061 }