home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / GUI / Classes / MyQuitPage.uc < prev    next >
Text File  |  2003-06-30  |  2KB  |  85 lines

  1. // ====================================================================
  2. //  (c) 2003, Epic Games, Inc.  All Rights Reserved
  3. // ====================================================================
  4.  
  5. class MyQuitPage extends GUIPage;
  6.  
  7. var automated GUIButton QuitBackground;
  8. var automated GUIButton YesButton;
  9. var automated GUIButton NoButton;
  10. var automated GUILabel     QuitDesc;
  11.  
  12. function bool InternalOnClick(GUIComponent Sender)
  13. {
  14.     if (Sender==YesButton)
  15.     {
  16.         if(PlayerOwner().Level.IsDemoBuild())
  17.             Controller.ReplaceMenu("GUI.UT2DemoQuitPage");
  18.         else
  19.             PlayerOwner().ConsoleCommand("exit");
  20.     }
  21.     else
  22.         Controller.CloseMenu(false);
  23.  
  24.     return true;
  25. }
  26.  
  27. defaultproperties
  28. {
  29.  
  30.     Begin Object Class=GUIButton name=cQuitBackground
  31.         WinWidth=1.0
  32.         WinHeight=1.0
  33.         WinTop=0
  34.         WinLeft=0
  35.         bAcceptsInput=false
  36.         bNeverFocus=true
  37.         StyleName="SquareBar"
  38.         bBoundToParent=true
  39.         bScaleToParent=true
  40.     End Object
  41.  
  42.     Begin Object Class=GUIButton Name=cYesButton
  43.         Caption="YES"
  44.         WinWidth=0.2
  45.         WinHeight=0.04
  46.         WinLeft=0.125
  47.         WinTop=0.75
  48.         bBoundToParent=true
  49.         OnClick=InternalOnClick
  50.         TabOrder=0
  51.     End Object
  52.  
  53.     Begin Object Class=GUIButton Name=cNoButton
  54.         Caption="NO"
  55.         WinWidth=0.2
  56.         WinHeight=0.04
  57.         WinLeft=0.65
  58.         WinTop=0.75
  59.         bBoundToParent=true
  60.         OnClick=InternalOnClick
  61.         TabOrder=1
  62.     End Object
  63.  
  64.     Begin Object class=GUILabel Name=cQuitDesc
  65.         Caption="Are you sure you wish to quit?"
  66.         TextALign=TXTA_Center
  67.         TextColor=(R=220,G=180,B=0,A=255)
  68.         TextFont="HeaderFont"
  69.         WinWidth=1
  70.         WinLeft=0
  71.         WinTop=0.4
  72.         WinHeight=32
  73.     End Object
  74.  
  75.     QuitBackground=cQuitBackground
  76.     YesButton=cYesButton
  77.     NoButton=cNoButton
  78.     QuitDesc=cQuitDesc
  79.  
  80.     WinLeft=0
  81.     WinTop=0.375
  82.     WinWidth=1
  83.     WinHeight=0.25
  84.     bRequire640x480=false
  85. }