class UMenuNetSpeedMenu expands UMenuPulldownMenu;

var UWindowPulldownMenuItem Internet, Fast, LAN;

var localized string[32] InternetName;
var localized string[32] FastName;
var localized string[32] LANName;

function Created()
{
	Super.Created();

	Internet = AddMenuItem(InternetName, None);
	Fast = AddMenuItem(FastName, None);
	LAN = AddMenuItem(LANName, None);

	if (Root.Console.ViewPort.Actor.NetSpeed > 12500)
	{
		LAN.bChecked = True;
	} else if (Root.Console.ViewPort.Actor.NetSpeed >= 3000) {
		Fast.bChecked = True;
	} else {
		Internet.bChecked = True;
	}
}

function ExecuteItem(UWindowPulldownMenuItem I) 
{
	local int NewSpeed;

	switch(I)
	{
		case Internet:
			Internet.bChecked = True;
			Fast.bChecked = False;
			LAN.bChecked = False;
			NewSpeed = 2600;
			break;
		case Fast:
			Internet.bChecked = False;
			Fast.bChecked = True;
			LAN.bChecked = False;
			NewSpeed = 5000;
			break;
		case LAN:
			Internet.bChecked = False;
			Fast.bChecked = False;
			LAN.bChecked = True;
			NewSpeed = 20000;
			break;
	}
	Root.Console.ViewPort.Actor.ConsoleCommand("NETSPEED "$NewSpeed);

	Super.ExecuteItem(I);
}

defaultproperties
{
	InternetName="Internet (28.8 - 56K)"
	FastName="Fast (ISDN, Cable)"
	LANName="Local Area Network"
}