Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowFramedWindow | +--UTMenu.UTPasswordWindow
UWindowSmallCloseButton
CloseButton
UWindowSmallButton
OKButton
string
OKText
void
BeforePaint(Canvas C, float X, float Y)
Close(optional bool)
Created()
Paint(Canvas C, float X, float Y)
Resized()
ResolutionChanged(float W, float H)
SetSizePos()
00001 class UTPasswordWindow expands UWindowFramedWindow; 00002 00003 var UWindowSmallCloseButton CloseButton; 00004 var UWindowSmallButton OKButton; 00005 var localized string OKText; 00006 00007 function Created() 00008 { 00009 Super.Created(); 00010 00011 OKButton = UWindowSmallButton(CreateWindow(class'UWindowSmallButton', WinWidth-108, WinHeight-24, 48, 16)); 00012 CloseButton = UWindowSmallCloseButton(CreateWindow(class'UWindowSmallCloseButton', WinWidth-56, WinHeight-24, 48, 16)); 00013 OKButton.Register(UTPasswordCW(ClientArea)); 00014 OKButton.SetText(OKText); 00015 SetSizePos(); 00016 bLeaveOnScreen = True; 00017 } 00018 00019 function ResolutionChanged(float W, float H) 00020 { 00021 Super.ResolutionChanged(W, H); 00022 SetSizePos(); 00023 } 00024 00025 function SetSizePos() 00026 { 00027 SetSize(250, 90); 00028 00029 WinLeft = Int((Root.WinWidth - WinWidth) / 2); 00030 WinTop = Int((Root.WinHeight - WinHeight) / 2); 00031 } 00032 00033 function Resized() 00034 { 00035 Super.Resized(); 00036 ClientArea.SetSize(ClientArea.WinWidth, ClientArea.WinHeight-24); 00037 } 00038 00039 function BeforePaint(Canvas C, float X, float Y) 00040 { 00041 Super.BeforePaint(C, X, Y); 00042 00043 OKButton.WinLeft = ClientArea.WinLeft+ClientArea.WinWidth-104; 00044 OKButton.WinTop = ClientArea.WinTop+ClientArea.WinHeight+4; 00045 CloseButton.WinLeft = ClientArea.WinLeft+ClientArea.WinWidth-52; 00046 CloseButton.WinTop = ClientArea.WinTop+ClientArea.WinHeight+4; 00047 } 00048 00049 function Paint(Canvas C, float X, float Y) 00050 { 00051 local Texture T; 00052 00053 T = GetLookAndFeelTexture(); 00054 DrawUpBevel( C, ClientArea.WinLeft, ClientArea.WinTop + ClientArea.WinHeight, ClientArea.WinWidth, 24, T); 00055 00056 Super.Paint(C, X, Y); 00057 } 00058 00059 function Close(optional bool bByParent) 00060 { 00061 Super.Close(bByParent); 00062 Root.Console.CloseUWindow(); 00063 } 00064 00065 defaultproperties 00066 { 00067 OKText="OK" 00068 ClientClass=Class'UTMenu.UTPasswordCW' 00069 WindowTitle="Enter Server Password" 00070 }