# SpatialFear.SFExtrasMenu

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 |
    //=============================================================================
    // Spatial Fear
    // Class: SFGameMenu
    // Descripton: Customized Menu class, for extra content
    //
    // Author: Chris Rogers
    //=============================================================================
    class SFExtrasMenu extends UWindowPulldownMenu;

    var UWindowPulldownMenuItem NewGame, LoadGame, SaveGame, Practice, Quit, ReturnToGame, ConvHistory, Training ;

    var localized string ConvHistoryName;
    var localized string ConvHistoryHelp;
    var localized string PracticeName;
    var localized string PracticeHelp;

    function Created()
    {
    	Super.Created();

    	// Add menu items.
    	ConvHistory = AddMenuItem("&Conversations", None);
    	AddMenuItem("-", None);
    	Practice = AddMenuItem("Custom &Levels", None);
    }

    function ShowWindow()
    {
    	Super.ShowWindow();
    	ReturnToGame.bDisabled = GetLevel().Game != None && GetLevel().Game.IsA('UTIntro');
    }

    function ExecuteItem(UWindowPulldownMenuItem I)
    {
    	local string StartMap;
    	local int EmptySlot, j;
    	local UWindowWindow wnd;

    	switch(I)
    	{
    	case ConvHistory:
    		wnd = Root.CreateWindow(class'SFMenuConversationRecallWindow', 50, 50, 100, 100);
    		wnd.bLeaveOnScreen = true;
    		break;
    	case Practice:
    		// Create practice game dialog.
    		wnd = Root.CreateWindow(class'SFBotmatchWindow', 100, 100, 200, 200, Self, True);
    		break;
    	}

    	Super.ExecuteItem(I);
    }

    function Select(UWindowPulldownMenuItem I)
    {
    	switch(I)
    	{
    	case ConvHistory:
    		ConvHistoryHelp="Select to view all conversations from your current game";
    		SFMenuMenuBar(GetMenuBar()).SetHelp(ConvHistoryHelp);
    		return;
    	case Practice:
    		PracticeHelp="Select to load a custom Spatial Fear level.";
    		SFMenuMenuBar(GetMenuBar()).SetHelp(PracticeHelp);
    		break;
    	}

    	Super.Select(I);
    }

    defaultproperties
    {
    }

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:44 PM
Created with UnCodeX