//=============================================================================
// NaliWWeapMenuPage.
//=============================================================================
class NaliWWeapMenuPage expands UMenuPageWindow;

var UWindowCheckBox bWRE, bFlame, bBolt, bGrav, bFreez, bVulcan;
var UWindowCheckBox bMiner, bMML, bIRPR, bCybot, bSBolt, bMegaTon, bUltima;
var UWindowCheckBox bNukeLvlA, bNukeLvlB, bNukeLvlC, bNukeLvlD, bNukeLvlE;

function AfterCreate()
{
    Super.AfterCreate();

    DesiredWidth = 220;
    DesiredHeight = 420;
}

function Created()
{
	bWRE = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 10, 270, 1));
	bWRE.SetText("Enable W.R.E.");
	bWRE.bChecked = class'NWMutator'.default.enable_WRE;

	bFlame = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 30, 270, 1));
	bFlame.SetText("Enable Flame Tracker");
	bFlame.bChecked = class'NWMutator'.default.enable_FlameT;

	bBolt = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 50, 270, 1));
	bBolt.SetText("Enable Bolt Rifle");
	bBolt.bChecked = class'NWMutator'.default.enable_BoltR;

	bGrav = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 70, 270, 1));
	bGrav.SetText("Enable Graviton");
	bGrav.bChecked = class'NWMutator'.default.enable_Graviton;

	bFreez = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 90, 270, 1));
	bFreez.SetText("Enable Freezer");
	bFreez.bChecked = class'NWMutator'.default.enable_Freezer;

	bVulcan = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 110, 270, 1));
	bVulcan.SetText("Enable Vulcan");
	bVulcan.bChecked = class'NWMutator'.default.enable_Vulcan;

	bMiner = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 130, 270, 1));
	bMiner.SetText("Enable The Miner");
	bMiner.bChecked = class'NWMutator'.default.enable_TheMiner;

	bMML = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 150, 270, 1));
	bMML.SetText("Enable MultiMissile Launcher");
	bMML.bChecked = class'NWMutator'.default.enable_MMLauncher;

	bIRPR = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 170, 270, 1));
	bIRPR.SetText("Enable I.R.P.R.");
	bIRPR.bChecked = class'NWMutator'.default.enable_IRPR;

	bCybot = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 200, 270, 1));
	bCybot.SetText("Enable Cybot Launcher");
	bCybot.bChecked = class'NWMutator'.default.enable_Cybot;

	bSBolt = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 220, 270, 1));
	bSBolt.SetText("Enable Enhanced Bolt Rifle");
	bSBolt.bChecked = class'NWMutator'.default.enable_SBoltR;

	bMegaTon = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 240, 270, 1));
	bMegaTon.SetText("Enable MegaTon");
	bMegaTon.bChecked = class'NWMutator'.default.enable_MegaTon;

	bUltima = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 260, 270, 1));
	bUltima.SetText("Enable UltimaProtos");
	bUltima.bChecked = class'NWMutator'.default.enable_UltimaProtos;

	bNukeLvlA = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 290, 270, 1));
	bNukeLvlA.SetText("Enable Nuclear Launcher Level 1");
	bNukeLvlA.bChecked = class'NWMutator'.default.enable_NukeLvlA;

	bNukeLvlB = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 310, 270, 1));
	bNukeLvlB.SetText("Enable Nuclear Launcher Level 2");
	bNukeLvlB.bChecked = class'NWMutator'.default.enable_NukeLvlB;

	bNukeLvlC = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 330, 270, 1));
	bNukeLvlC.SetText("Enable Nuclear Launcher Level 3");
	bNukeLvlC.bChecked = class'NWMutator'.default.enable_NukeLvlC;

	bNukeLvlD = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 350, 270, 1));
	bNukeLvlD.SetText("Enable Nuclear Launcher Level 4");
	bNukeLvlD.bChecked = class'NWMutator'.default.enable_NukeLvlD;
	
	bNukeLvlE = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 370, 270, 1));
	bNukeLvlE.SetText("Enable Nuclear Launcher Level 5");
	bNukeLvlE.bChecked = class'NWMutator'.default.enable_NukeLvlE;

}



function Notify(UWindowDialogControl C, byte E)
{

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

				case bWRE:
					class'NWMutator'.default.enable_WRE = bWRE.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bFlame:
					class'NWMutator'.default.enable_FlameT = bFlame.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bBolt:
					class'NWMutator'.default.enable_BoltR = bBolt.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bGrav:
					class'NWMutator'.default.enable_Graviton = bGrav.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bFreez:
					class'NWMutator'.default.enable_Freezer = bFreez.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bVulcan:
					class'NWMutator'.default.enable_Vulcan = bVulcan.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bMiner:
					class'NWMutator'.default.enable_TheMiner = bMiner.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bMML:
					class'NWMutator'.default.enable_MMLauncher = bMML.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bIRPR:
					class'NWMutator'.default.enable_IRPR = bIRPR.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bCybot:
					class'NWMutator'.default.enable_Cybot = bCybot.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bSBolt:
					class'NWMutator'.default.enable_SBoltR = bSBolt.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bMegaTon:
					class'NWMutator'.default.enable_MegaTon = bMegaTon.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bUltima:
					class'NWMutator'.default.enable_UltimaProtos = bUltima.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bNukeLvlA:
					class'NWMutator'.default.enable_NukeLvlA = bNukeLvlA.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bNukeLvlB:
					class'NWMutator'.default.enable_NukeLvlB = bNukeLvlB.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bNukeLvlC:
					class'NWMutator'.default.enable_NukeLvlC = bNukeLvlC.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bNukeLvlD:
					class'NWMutator'.default.enable_NukeLvlD = bNukeLvlD.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bNukeLvlE:
					class'NWMutator'.default.enable_NukeLvlE = bNukeLvlE.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
			}				
		break;
	}
}


