Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowFramedWindow | +--UBrowser.UBrowserOpenWindow
UWindowSmallCloseButton
CloseButton
UWindowSmallButton
OKButton
string
OKText
void
BeforePaint(Canvas C, float X, float Y)
Created()
Paint(Canvas C, float X, float Y)
Resized()
ResolutionChanged(float W, float H)
SetSizePos()
00001 class UBrowserOpenWindow 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(UBrowserOpenCW(ClientArea)); 00014 OKButton.SetText(OKText); 00015 SetSizePos(); 00016 } 00017 00018 function ResolutionChanged(float W, float H) 00019 { 00020 Super.ResolutionChanged(W, H); 00021 SetSizePos(); 00022 } 00023 00024 function SetSizePos() 00025 { 00026 SetSize(300, 90); 00027 00028 WinLeft = Int((Root.WinWidth - WinWidth) / 2); 00029 WinTop = Int((Root.WinHeight - WinHeight) / 2); 00030 } 00031 00032 function Resized() 00033 { 00034 Super.Resized(); 00035 ClientArea.SetSize(ClientArea.WinWidth, ClientArea.WinHeight-24); 00036 } 00037 00038 function BeforePaint(Canvas C, float X, float Y) 00039 { 00040 Super.BeforePaint(C, X, Y); 00041 00042 OKButton.WinLeft = ClientArea.WinLeft+ClientArea.WinWidth-104; 00043 OKButton.WinTop = ClientArea.WinTop+ClientArea.WinHeight+4; 00044 CloseButton.WinLeft = ClientArea.WinLeft+ClientArea.WinWidth-52; 00045 CloseButton.WinTop = ClientArea.WinTop+ClientArea.WinHeight+4; 00046 } 00047 00048 function Paint(Canvas C, float X, float Y) 00049 { 00050 local Texture T; 00051 00052 T = GetLookAndFeelTexture(); 00053 DrawUpBevel( C, ClientArea.WinLeft, ClientArea.WinTop + ClientArea.WinHeight, ClientArea.WinWidth, 24, T); 00054 00055 Super.Paint(C, X, Y); 00056 } 00057 00058 defaultproperties 00059 { 00060 OKText="OK" 00061 ClientClass=Class'UBrowser.UBrowserOpenCW' 00062 WindowTitle="Open Location" 00063 }