class UMenuOptionsMenu expands UMenuPulldownMenu;

var UWindowPulldownMenuItem Basic, Customize, Prioritize, AudioVideo, Desktop, MenuConfig, Advanced;

var localized string[32] BasicName;
var localized string[32] CustomizeName;
var localized string[32] PrioritizeName;
var localized string[32] AVName;
var localized string[32] DesktopName;
var localized string[32] MenuConfigName;
var localized string[32] AdvancedName;

function Created()
{
	Super.Created();

	Basic = AddMenuItem(BasicName, None);
	Customize = AddMenuItem(CustomizeName, None);
	Prioritize = AddMenuItem(PrioritizeName, None);
	AudioVideo = AddMenuItem(AVName, None);

	AddMenuItem("-", None);

	Desktop = AddMenuItem(DesktopName, None);
	if (Root.Console.ShowDesktop)
		Desktop.bChecked = True;
	MenuConfig = AddMenuItem(MenuConfigName, None);

	AddMenuItem("-", None);

	Advanced = AddMenuItem(AdvancedName, None);
}


function ExecuteItem(UWindowPulldownMenuItem I) 
{
	switch (I)
	{
	case Basic:
		// Create basic options dialog.
		Root.CreateWindow(Class'UMenuBasicOptionsWindow', 100, 100, 200, 200);
		break;
	case Customize:
		// Create customize controls dialog.
		//Root.CreateWindow(Class'UMenuCustomizeWindow', 100, 100, 200, 200);
		break;
	case Prioritize:
		// Create prioritize weapons dialog.
		//Root.CreateWindow(Class'UMenuWeaponPrioritiesWindow', 100, 100, 200, 200);
		break;
	case AudioVideo:
		// Create Audio/Video options dialog.
		Root.CreateWindow(Class'UMenuAudioVideoWindow', 100, 100, 200, 200);
		break;
	case Desktop:
		// Toggle show desktop.
		Desktop.bChecked = !Desktop.bChecked;
		Root.Console.ShowDesktop = !Root.Console.ShowDesktop;
		Root.Console.bNoDrawWorld = Root.Console.ShowDesktop;
		break;
	case MenuConfig:
		// Create menu system config dialog.
		Root.CreateWindow(Class'UMenuMenuConfigWindow', 100, 100, 200, 200);
		break;
	case Advanced:
		// Show advanced options.
		Root.Console.ViewPort.Actor.ConsoleCommand("PREFERENCES");
		return;
	}

	Super.ExecuteItem(I);
}

defaultproperties
{
	BasicName="Basic Options"
	CustomizeName="Customize Controls"
	PrioritizeName="Prioritize Weapons"
	AVName="Audio/Video"
	DesktopName="Show Desktop"
	MenuConfigName="UMenu Configuration"
	AdvancedName="Advanced Options"
}
