class UMenuHelpMenu expands UMenuPulldownMenu;

var UWindowPulldownMenuItem Context, About;

var localized string[32] ContextName;
var localized string[32] AboutName;

function Created()
{
	Super.Created();

	Context = AddMenuItem(ContextName, None);

	About = AddMenuItem(AboutName, None);
}

function ExecuteItem(UWindowPulldownMenuItem I) 
{
	local UMenuMenuBar MenuBar;

	MenuBar = UMenuMenuBar(GetMenuBar());

	switch(I)
	{
	case Context:
		Context.bChecked = !Context.bChecked;
		MenuBar.ShowHelp = !MenuBar.ShowHelp;
		if (Context.bChecked)
		{
			if (MenuBar.HelpWindow != None)
			{
				MenuBar.HelpWindow.ShowWindow();
			} else {
				MenuBar.HelpWindow = UMenuHelpWindow(Root.CreateWindow(class'UMenuHelpWindow', 0, 0, 100, 100));
			}
		} else {
			MenuBar.HelpWindow.HideWindow();
		}
		break;
	case About:
		// Create about subwindow.
		return;
	}

	Super.ExecuteItem(I);
}

defaultproperties
{
	ContextName="Context Help"
	AboutName="About Unreal..."
}