//=============================================================================
// NXTeamMenuPage.
//=============================================================================
class NXTeamMenuPage expands UMenuPageWindow;

var UWindowCheckBox bTeamCNuke, bTeamCMissile, bTeamCShock, bTeamCTrace;
var UWindowCheckBox bGhostP, bGhostJ, bGhostN, bGhostM;
var UWindowCheckBox bIgnFriendDam;

function AfterCreate()
{
    Super.AfterCreate();

    DesiredWidth = 220;
    DesiredHeight = 240;
}

function Created()
{
	bTeamCNuke = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 10, 270, 1));
	bTeamCNuke.SetText("Enable Nuclear Missile Team Color");
	bTeamCNuke.bChecked = class'AntiSlv'.default.bTeamColoredNuke;

	bTeamCMissile = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 30, 270, 1));
	bTeamCMissile.SetText("Enable Missiles Team Color");
	bTeamCMissile.bChecked = class'CarriedMissile'.default.bTeamColored;

	bTeamCShock = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 50, 270, 1));
	bTeamCShock.SetText("Enable Nuclear Shockwave Team Color");
	bTeamCShock.bChecked = class'StrangeWave'.default.bTeamColored;

	bTeamCTrace = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 70, 270, 1));
	bTeamCTrace.SetText("Enable Machine Guns Tracing Color");
	bTeamCTrace.bChecked = class'MTracerB'.default.bTeamColour;

	bGhostP = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 100, 270, 1));
	bGhostP.SetText("Enable Ghost Mode on Friendly Players");
	bGhostP.bChecked = class'StrangeWave'.default.bGhostPawns;

	bGhostJ = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 120, 270, 1));
	bGhostJ.SetText("Enable Ghost Mode on Friendly Jets");
	bGhostJ.bChecked = class'StrangeWave'.default.bGhostJets;

	bGhostN = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 140, 270, 1));
	bGhostN.SetText("Enable Ghost Mode on Friendly Nuclear Missiles");
	bGhostN.bChecked = class'StrangeWave'.default.bGhostNukes;

	bGhostM = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 160, 270, 1));
	bGhostM.SetText("Enable Ghost Mode on Friendly Missiles");
	bGhostM.bChecked = class'StrangeWave'.default.bGhostMissiles;

	bIgnFriendDam = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 190, 270, 1));
	bIgnFriendDam.SetText("Nuclear Missiles: Ignore friendly damage");
	bIgnFriendDam.bChecked = class'AntiSlv'.default.bIgnoreFriendlyDam;
}



function Notify(UWindowDialogControl C, byte E)
{

	switch(E) {
		case DE_Change: // the message sent by sliders and checkboxes
			switch(C) 
			{
				case bTeamCNuke:
					class'AntiSlv'.default.bTeamColoredNuke = bTeamCNuke.bChecked;
					class'AntiSlv'.static.StaticSaveConfig();
					break;
				case bTeamCMissile:
					class'CarriedMissile'.default.bTeamColored = bTeamCMissile.bChecked;
					class'CarriedMissile'.static.StaticSaveConfig();
					break;
				case bTeamCShock:
					class'StrangeWave'.default.bTeamColored = bTeamCShock.bChecked;
					class'StrangeWave'.static.StaticSaveConfig();
					break;
				case bTeamCTrace:
					class'MTracerB'.default.bTeamColour = bTeamCTrace.bChecked;
					class'MTracerB'.static.StaticSaveConfig();
					break;
				case bGhostP:
					class'StrangeWave'.default.bGhostPawns = bGhostP.bChecked;
					class'StrangeWave'.static.StaticSaveConfig();
					break;
				case bGhostJ:
					class'StrangeWave'.default.bGhostJets = bGhostJ.bChecked;
					class'StrangeWave'.static.StaticSaveConfig();
					break;
				case bGhostN:
					class'StrangeWave'.default.bGhostNukes = bGhostN.bChecked;
					class'StrangeWave'.static.StaticSaveConfig();
					break;
				case bGhostM:
					class'StrangeWave'.default.bGhostMissiles = bGhostM.bChecked;
					class'StrangeWave'.static.StaticSaveConfig();
					break;
				case bIgnFriendDam:
					class'AntiSlv'.default.bIgnoreFriendlyDam = bIgnFriendDam.bChecked;
					class'AntiSlv'.static.StaticSaveConfig();
					break;
			}				
		break;
	}
}


