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

UnrealShare.UnrealSaveMenu


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
//=============================================================================
// UnrealSaveMenu
//=============================================================================
class UnrealSaveMenu extends UnrealSlotMenu;

var localized string CantSave;

function BeginPlay()
{
    local int i;

    Super.BeginPlay();
    For (i=0; i<9; i++ )
        if (SlotNames[i] ~= "..Empty.." )
        {
            Selection = i + 1;
            break;
        }
}

function bool ProcessSelection()
{
    if ( PlayerOwner.Health <= 0 )
        return true;

    if ( Level.Minute < 10 )
        SlotNames[Selection - 1] = (Level.Title@Level.Hour$"\:0"$Level.Minute@MonthNames[Level.Month - 1]@Level.Day);
    else
        SlotNames[Selection - 1] = (Level.Title@Level.Hour$"\:"$Level.Minute@MonthNames[Level.Month - 1]@Level.Day);

    if ( Level.NetMode != NM_Standalone )
        SlotNames[Selection - 1] = "Net:"$SlotNames[Selection - 1];
    SaveConfig();
    bExitAllMenus = true;
    PlayerOwner.ClientMessage(" ");
    PlayerOwner.bDelayedCommand = true;
    PlayerOwner.DelayedCommand = "SaveGame "$(Selection - 1);
    return true;
}

function DrawMenu(canvas Canvas)
{

    if ( PlayerOwner.Health <= 0 )
    {
        MenuTitle = CantSave;
        DrawTitle(Canvas);
        return;
    }

    DrawBackGround(Canvas, (Canvas.ClipY < 320));
    DrawTitle(Canvas);
    DrawSlots(Canvas);  
}

defaultproperties
{
     CantSave="CAN'T SAVE WHEN DEAD"
     MenuTitle="SAVE GAME"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:27:48.000 - Creation time: za 22-4-2006 13:29:33.109 - Created with UnCodeX