Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

GUI2K4.UT2K4QuitPage


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
//==============================================================================
//	Confirmation page for quitting the game.  Brings the user to an advertisement
//  page if this is the demo version of the game.
//
//	Created by Ron Prestenback
//	© 2003, Epic Games, Inc.  All Rights Reserved
//==============================================================================

class UT2K4QuitPage extends BlackoutWindow;

var automated GUIButton YesButton;
var automated GUIButton NoButton;
var automated GUILabel  QuitDesc;

function bool InternalOnClick(GUIComponent Sender)
{
    if (Sender==YesButton)
    {
        if(PlayerOwner().Level.IsDemoBuild())
            Controller.ReplaceMenu("XInterface.UT2DemoQuitPage");
        else
            PlayerOwner().ConsoleCommand("exit");
    }
    else
        Controller.CloseMenu(false);

    return true;
}

function bool InternalOnKeyEvent( out byte Key, out byte State, float Delta )
{
    if ( State == 3 )
    {
        if ( Key == 0x0B ) // Cancel
            InternalOnClick(NoButton);

        else if ( Key == 0x0D )
            InternalOnClick(YesButton);
    }

    return false;
}

defaultproperties
{
     Begin Object Class=GUIButton Name=cYesButton
         Caption="YES"
         WinTop=0.515625
         WinLeft=0.164063
         WinWidth=0.200000
         TabOrder=0
         OnClick=UT2K4QuitPage.InternalOnClick
         OnKeyEvent=cYesButton.InternalOnKeyEvent
     End Object
     YesButton=GUIButton'GUI2K4.UT2K4QuitPage.cYesButton'

     Begin Object Class=GUIButton Name=cNoButton
         Caption="NO"
         WinTop=0.515625
         WinLeft=0.610937
         WinWidth=0.200000
         TabOrder=1
         OnClick=UT2K4QuitPage.InternalOnClick
         OnKeyEvent=cNoButton.InternalOnKeyEvent
     End Object
     NoButton=GUIButton'GUI2K4.UT2K4QuitPage.cNoButton'

     Begin Object Class=GUILabel Name=cQuitDesc
         Caption="Are you sure you wish to quit?"
         TextAlign=TXTA_Center
         TextColor=(B=244,G=237,R=253)
         TextFont="UT2HeaderFont"
         WinTop=0.426042
         WinHeight=32.000000
         RenderWeight=4.000000
     End Object
     QuitDesc=GUILabel'GUI2K4.UT2K4QuitPage.cQuitDesc'

     OnKeyEvent=UT2K4QuitPage.InternalOnKeyEvent
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:58.000 - Creation time: Mo 16.4.2007 11:20:56.156 - Created with UnCodeX