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

UnrealShare.UnrealCoopGameOptions


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
//=============================================================================
// UnrealCoopGameOptions
//=============================================================================
class UnrealCoopGameOptions extends UnrealGameOptionsMenu;

var localized string Difficulties[4];

function bool ProcessLeft()
{
    if ( Selection == 3 )
        UnrealServerMenu(ParentMenu).Difficulty = Max( 0, UnrealServerMenu(ParentMenu).Difficulty - 1 );
    else 
        return Super.ProcessLeft();

    return true;
}

function bool ProcessRight()
{
    if ( Selection == 3 )
        UnrealServerMenu(ParentMenu).Difficulty = Min( 3, UnrealServerMenu(ParentMenu).Difficulty + 1 );
    else 
        return Super.ProcessRight();

    return true;
}

function DrawOptions(canvas Canvas, int StartX, int StartY, int Spacing)
{
    MenuList[3] = Default.MenuList[3];
    Super.DrawOptions(Canvas, StartX, StartY, Spacing);
}

function DrawValues(canvas Canvas, int StartX, int StartY, int Spacing)
{
    local DeathMatchGame DMGame;

    DMGame = DeathMatchGame(GameType);

    // draw text
    if ( UnrealServerMenu(ParentMenu).Difficulty < 0 )
        UnrealServerMenu(ParentMenu).Difficulty = 1;
    MenuList[3] = Difficulties[UnrealServerMenu(ParentMenu).Difficulty];
    Super.DrawValues(Canvas, StartX, StartY, Spacing);
}

defaultproperties
{
     Difficulties(0)="Easy"
     Difficulties(1)="Medium"
     Difficulties(2)="Hard"
     Difficulties(3)="Unreal"
     GameClass=Class'UnrealShare.CoopGame'
     MenuLength=3
     HelpMessage(3)="Skill level setting."
     MenuList(3)="Difficulty"
}

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.468 - Created with UnCodeX