Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowClientWindow | +--UWindow.UWindowDialogClientWindow | +--UMenu.UMenuDialogClientWindow | +--UTMenu.FreeSlotsClient
UWindowSmallButton
DoneButton
string
DoneText
UMenuLabelControl
QueryLabel
QueryText
void
Created()
DonePressed()
Notify(UWindowDialogControl C, byte E)
Paint(Canvas C, float X, float Y)
Resized()
00001 class FreeSlotsClient extends UMenuDialogClientWindow; 00002 00003 // Window 00004 var UMenuLabelControl QueryLabel; 00005 00006 var UWindowSmallButton DoneButton; 00007 00008 var localized string QueryText; 00009 var localized string DoneText; 00010 00011 function Created() 00012 { 00013 QueryLabel = UMenuLabelControl(CreateWindow(class'UMenuLabelControl', WinWidth+20, 0, WinWidth-40, 12)); 00014 QueryLabel.SetText(QueryText); 00015 00016 DoneButton = UWindowSmallButton(CreateControl(class'UWindowSmallButton', (WinWidth - 48)/2, WinHeight-24, 48, 16)); 00017 DoneButton.SetText(DoneText); 00018 00019 Super.Created(); 00020 } 00021 00022 function Resized() 00023 { 00024 local int CenterWidth, CenterPos; 00025 00026 CenterWidth = (WinWidth/4)*3; 00027 CenterPos = (WinWidth - CenterWidth)/2; 00028 00029 QueryLabel.WinLeft = CenterPos; 00030 QueryLabel.SetSize(CenterWidth, QueryLabel.WinHeight); 00031 QueryLabel.WinTop = (WinHeight - QueryLabel.WinHeight)/2 - 11; 00032 00033 DoneButton.WinLeft = (WinWidth - 48)/2; 00034 DoneButton.WinTop = WinHeight-20; 00035 } 00036 00037 function Paint(Canvas C, float X, float Y) 00038 { 00039 local Texture T; 00040 00041 Super.Paint(C, X, Y); 00042 00043 T = GetLookAndFeelTexture(); 00044 00045 DrawUpBevel( C, 0, WinHeight-22, WinWidth, 22, T); 00046 } 00047 00048 function Notify(UWindowDialogControl C, byte E) 00049 { 00050 Super.Notify(C, E); 00051 00052 switch(E) 00053 { 00054 case DE_Click: 00055 switch (C) 00056 { 00057 case DoneButton: 00058 DonePressed(); 00059 break; 00060 } 00061 } 00062 } 00063 00064 function DonePressed() 00065 { 00066 Close(); 00067 00068 GetPlayerOwner().SetPause( False ); 00069 00070 if (DeathMatchPlus(GetLevel().Game) != None) 00071 DeathMatchPlus(GetLevel().Game).bDontRestart = False; 00072 00073 Root.Console.bQuickKeyEnable = False; 00074 Root.Console.CloseUWindow(); 00075 } 00076 00077 defaultproperties 00078 { 00079 QueryText="Free a save slot first!" 00080 DoneText="OK" 00081 }