//=============================================================================
// NaliWCTFMenuPage.
//=============================================================================
class NaliWCTFMenuPage expands UMenuPageWindow;

var UWindowCheckBox ad_WRE, ad_Flame, ad_Bolt, ad_Grav, ad_Freez;
var UWindowCheckBox ad_Vulcan, ad_Miner, ad_MML, ad_IRPR, ad_Cybot, ad_SBolt;
var UWindowCheckBox ad_MegaTon, ad_Ultima, bInfEBRAmmo;
var UWindowEditControl ad_Multi;
var UWindowCheckBox ad_NukeA, ad_NukeB, ad_NukeC, ad_NukeD, ad_NukeE;

function AfterCreate()
{
    Super.AfterCreate();

    DesiredWidth = 220;
    DesiredHeight = 520;
}

function Created()
{
	ad_WRE = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 10, 270, 1));
	ad_WRE.SetText("Add W.R.E.");
	ad_WRE.bChecked = class'CTFNWMutator'.default.add_WRE;

	ad_Flame = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 30, 270, 1));
	ad_Flame.SetText("Add Flame Tracker");
	ad_Flame.bChecked = class'CTFNWMutator'.default.add_FlameT;

	ad_Bolt = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 50, 270, 1));
	ad_Bolt.SetText("Add Bolt Rifle");
	ad_Bolt.bChecked = class'CTFNWMutator'.default.add_BoltR;

	ad_Grav = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 70, 270, 1));
	ad_Grav.SetText("Add Graviton");
	ad_Grav.bChecked = class'CTFNWMutator'.default.add_Graviton;

	ad_Freez = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 90, 270, 1));
	ad_Freez.SetText("Add Freezer");
	ad_Freez.bChecked = class'CTFNWMutator'.default.add_Freezer;

	ad_Vulcan = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 110, 270, 1));
	ad_Vulcan.SetText("Add Vulcan");
	ad_Vulcan.bChecked = class'CTFNWMutator'.default.add_Vulcan;

	ad_Miner = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 130, 270, 1));
	ad_Miner.SetText("Add The Miner");
	ad_Miner.bChecked = class'CTFNWMutator'.default.add_TheMiner;

	ad_MML = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 150, 270, 1));
	ad_MML.SetText("Add MultiMissile Launcher");
	ad_MML.bChecked = class'CTFNWMutator'.default.add_MMLauncher;

	ad_IRPR = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 170, 270, 1));
	ad_IRPR.SetText("Add I.R.P.R.");
	ad_IRPR.bChecked = class'CTFNWMutator'.default.add_IRPR;

	ad_Cybot = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 200, 270, 1));
	ad_Cybot.SetText("Add Cybot Launcher");
	ad_Cybot.bChecked = class'CTFNWMutator'.default.add_Cybot;

	ad_SBolt = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 220, 270, 1));
	ad_SBolt.SetText("Add Enhanced Bolt Rifle");
	ad_SBolt.bChecked = class'CTFNWMutator'.default.add_SBoltR;

	ad_MegaTon = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 240, 270, 1));
	ad_MegaTon.SetText("Add MegaTon");
	ad_MegaTon.bChecked = class'CTFNWMutator'.default.add_MegaTon;

	ad_Ultima = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 260, 270, 1));
	ad_Ultima.SetText("Add UltimaProtos");
	ad_Ultima.bChecked = class'CTFNWMutator'.default.add_UltimaProtos;

	ad_NukeA = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 290, 270, 1));
	ad_NukeA.SetText("Add Nuclear Launcher Level 1");
	ad_NukeA.bChecked = class'CTFNWMutator'.default.add_NukeA;

	ad_NukeB = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 310, 270, 1));
	ad_NukeB.SetText("Add Nuclear Launcher Level 2");
	ad_NukeB.bChecked = class'CTFNWMutator'.default.add_NukeB;

	ad_NukeC = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 330, 270, 1));
	ad_NukeC.SetText("Add Nuclear Launcher Level 3");
	ad_NukeC.bChecked = class'CTFNWMutator'.default.add_NukeC;
	
	ad_NukeD = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 350, 270, 1));
	ad_NukeD.SetText("Add Nuclear Launcher Level 4");
	ad_NukeD.bChecked = class'CTFNWMutator'.default.add_NukeD;

	ad_NukeE = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 370, 270, 1));
	ad_NukeE.SetText("Add Nuclear Launcher Level 5");
	ad_NukeE.bChecked = class'CTFNWMutator'.default.add_NukeE;


	bInfEBRAmmo = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 430, 270, 1));
	bInfEBRAmmo.SetText("Enhanced Bolt Rifle Infinite Ammunition");
	bInfEBRAmmo.bChecked = class'CTFNWMutator'.default.bInfiniteEBRAmmo;

	ad_Multi = UWindowEditControl(CreateControl(class'UWindowEditControl', 10, 470, 270, 1));
	ad_Multi.SetText("Added Weapons Ammo Multiplier");
	ad_Multi.SetNumericOnly(True);
	ad_Multi.SetNumericFloat(False);
	ad_Multi.SetMaxLength(2);
	ad_Multi.Align = TA_Left;
	ad_Multi.SetValue(String(class'CTFNWMutator'.default.AddedWeaponsAmmoMulti));
	ad_Multi.EditBoxWidth = WinWidth / 8;

}



function Notify(UWindowDialogControl C, byte E)
{

	switch(E) {
		case DE_Change: // the message sent by sliders and checkboxes
			switch(C) 
			{

				case ad_Multi: 
					class'CTFNWMutator'.default.AddedWeaponsAmmoMulti = Int(ad_Multi.GetValue());
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;


				case ad_WRE:
					class'CTFNWMutator'.default.add_WRE = ad_WRE.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Flame:
					class'CTFNWMutator'.default.add_FlameT = ad_Flame.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Bolt:
					class'CTFNWMutator'.default.add_BoltR = ad_Bolt.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Grav:
					class'CTFNWMutator'.default.add_Graviton = ad_Grav.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Freez:
					class'CTFNWMutator'.default.add_Freezer = ad_Freez.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Vulcan:
					class'CTFNWMutator'.default.add_Vulcan = ad_Vulcan.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Miner:
					class'CTFNWMutator'.default.add_TheMiner = ad_Miner.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_MML:
					class'CTFNWMutator'.default.add_MMLauncher = ad_MML.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_IRPR:
					class'CTFNWMutator'.default.add_IRPR = ad_IRPR.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Cybot:
					class'CTFNWMutator'.default.add_Cybot = ad_Cybot.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_SBolt:
					class'CTFNWMutator'.default.add_SBoltR = ad_SBolt.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_MegaTon:
					class'CTFNWMutator'.default.add_MegaTon = ad_MegaTon.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_Ultima:
					class'CTFNWMutator'.default.add_UltimaProtos = ad_Ultima.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_NukeA:
					class'CTFNWMutator'.default.add_NukeA = ad_NukeA.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_NukeB:
					class'CTFNWMutator'.default.add_NukeB = ad_NukeB.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_NukeC:
					class'CTFNWMutator'.default.add_NukeC = ad_NukeC.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_NukeD:
					class'CTFNWMutator'.default.add_NukeD = ad_NukeD.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case ad_NukeE:
					class'CTFNWMutator'.default.add_NukeE = ad_NukeE.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;
				case bInfEBRAmmo:
					class'CTFNWMutator'.default.bInfiniteEBRAmmo = bInfEBRAmmo.bChecked;
					class'CTFNWMutator'.static.StaticSaveConfig();
					break;


			}				
		break;
	}
}


