class UMenuToolsMenu expands UMenuPulldownMenu;

var UWindowPulldownMenuItem Console, TimeDemo;

var localized string[32] ConsoleName;
var localized string[32] TimeDemoName;

function Created()
{
	Super.Created();

	// Add menu items.
	Console = AddMenuItem(ConsoleName, None);
	Console.bChecked = Root.Console.bShowConsole;
	TimeDemo = AddMenuItem(TimeDemoName, None);
	TimeDemo.bChecked = Root.Console.bTimeDemo;
}

function ShowWindow()
{
	Super.ShowWindow();

	Console.bChecked = Root.Console.bShowConsole;
}

function ExecuteItem(UWindowPulldownMenuItem I) 
{
	switch(I)
	{
	case Console:
		Console.bChecked = !Console.bChecked;
		if (Console.bChecked)
			Root.Console.ShowConsole();
		else
			Root.Console.HideConsole();
		break;
	case TimeDemo:
		TimeDemo.bChecked = !TimeDemo.bChecked;
		Root.Console.ViewPort.Actor.ConsoleCommand("TIMEDEMO "$TimeDemo.bChecked);
		break;
	}

	Super.ExecuteItem(I);
}

defaultproperties
{
	ConsoleName="System Console"
	TimeDemoName="TimeDemo Statistics"
}