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

UnrealShare.UnrealNewGameMenu


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
//=============================================================================
// UnrealNewGameMenu
//=============================================================================
class UnrealNewGameMenu extends UnrealGameMenu;

var string StartMap;

function Destroyed()
{
    Super.Destroyed();
}

function PostBeginPlay()
{
    Super.PostBeginPlay();
    Selection = Clamp(Level.Game.Difficulty + 1,1,4);
} 

function bool ProcessSelection()
{
    local Menu ChildMenu;

    ChildMenu = spawn(class'UnrealMeshMenu', owner);
    HUD(Owner).MainMenu = ChildMenu;
    ChildMenu.ParentMenu = self;
    ChildMenu.PlayerOwner = PlayerOwner;
    StartMap = StartMap$"?Difficulty="$(Selection - 1);
    if ( Level.Game != None )
        StartMap = StartMap$"?GameSpeed="$Level.Game.GameSpeed;
    UnrealMeshMenu(ChildMenu).StartMap = StartMap;
    UnrealMeshMenu(ChildMenu).SinglePlayerOnly = true;
    return true;
}

function SaveConfigs();


function DrawMenu(canvas Canvas)
{
    local int StartX, StartY, Spacing;
    
    DrawBackGround(Canvas, false);  
    
    Spacing = Clamp(0.1 * Canvas.ClipY, 16, 48);
    StartX = Max(40, 0.5 * Canvas.ClipX - 96);
    StartY = Max(8, 0.5 * (Canvas.ClipY - 5 * Spacing - 128));

    DrawList(Canvas, true, Spacing, StartX, StartY); 
    DrawHelpPanel(Canvas, StartY + MenuLength * Spacing + 8, 228);
}

defaultproperties
{
     MenuLength=4
     HelpMessage(1)="Tourist mode."
     HelpMessage(2)="Ready for some action!"
     HelpMessage(3)="Not for the faint of heart."
     HelpMessage(4)="Death wish."
     MenuList(1)="EASY"
     MenuList(2)="MEDIUM"
     MenuList(3)="HARD"
     MenuList(4)="UNREAL"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:06:32.000 - Creation time: za 22-4-2006 13:07:28.687 - Created with UnCodeX