//=============================================================================
// NaliWMiscMenuPage.
//=============================================================================
class NaliWMiscMenuPage expands UMenuPageWindow;

var UWindowCheckBox WRERepl, bMineChain, bFlames, bCColDet, bCybotID;
var UWindowCheckBox bMineID, bMegaID, bCorpseOver, MHBases, WeapBases, PickBases;
var UWindowCheckBox bLightsFX, bOldSkoolRep, bRX, bRXBases;
var UWindowEditControl MineLS;
var UWindowCheckBox bFlameDet, bFlameBall, bGravFlyHax, bXMissile;
var UWindowCheckBox bWeapLight, bAmmoLight, bPickLight, bChargLight;
var UWindowEditControl MegaTime;

function AfterCreate()
{
    Super.AfterCreate();

    DesiredWidth = 220;
    DesiredHeight = 630;
}

function Created()
{
	WRERepl = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 10, 270, 1));
	WRERepl.SetText("Replace start Enforcer by the W.R.E.");
	WRERepl.bChecked = class'NWMutator'.default.WRE_replace_Enforcer;

	bMineChain = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 30, 270, 1));
	bMineChain.SetText("Enable mines explosion chain");
	bMineChain.bChecked = class'NWMutator'.default.bMineExplosionChain;

	bFlames = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 50, 270, 1));
	bFlames.SetText("Enable Flame Tracker burning flames");
	bFlames.bChecked = class'NWMutator'.default.EnableFTrackerFlames;

	bCColDet = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 70, 270, 1));
	bCColDet.SetText("Nuclear Coronas Full Collision Detail");
	bCColDet.bChecked = class'NWMutator'.default.bCoronasCollisionDetail;

	bCorpseOver = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 90, 270, 1));
	bCorpseOver.SetText("Enable Corpse/Pawn Overlayer Effects");
	bCorpseOver.bChecked = class'NWMutator'.default.EnableCorpseOverlayers;

	bMineID = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 120, 270, 1));
	bMineID.SetText("Mines Color ID in Team Games");
	bMineID.bChecked = class'NWMutator'.default.bMineID_InTeamGames;

	bCybotID = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 140, 270, 1));
	bCybotID.SetText("Cybots Color ID in Team Games");
	bCybotID.bChecked = class'NWMutator'.default.bCybotID_InTeamGames;

	bMegaID = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 160, 270, 1));
	bMegaID.SetText("MegaTon Device Color ID in Team Games");
	bMegaID.bChecked = class'NWMutator'.default.bMegaTonID_InTeamGames;

	MHBases = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 190, 270, 1));
	MHBases.SetText("Enable Modifier Chargers");
	MHBases.bChecked = class'NWMutator'.default.bMHChargers;

	WeapBases = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 210, 270, 1));
	WeapBases.SetText("Enable Weapon Chargers");
	WeapBases.bChecked = class'NWMutator'.default.bWeaponChargers;

	PickBases = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 230, 270, 1));
	PickBases.SetText("Enable Pickup Chargers");
	PickBases.bChecked = class'NWMutator'.default.bPickupChargers;

	bLightsFX = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 250, 270, 1));
	bLightsFX.SetText("Enable Charger Lights");
	bLightsFX.bChecked = class'NWMutator'.default.EnableChargersLightsFX;

	bOldSkoolRep = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 280, 270, 1));
	bOldSkoolRep.SetText("Replace OldSkool Weapons");
	bOldSkoolRep.bChecked = class'NWMutator'.default.ReplaceOldSkoolWeapons;

	bRX = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 310, 270, 1));
	bRX.SetText("Enable RX mode");
	bRX.bChecked = class'NWMutator'.default.bRXServerConfig;

	bRXBases = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 330, 270, 1));
	bRXBases.SetText("Enable RX Chargers");
	bRXBases.bChecked = class'NWMutator'.default.EnableRXChargers;

	MineLS = UWindowEditControl(CreateControl(class'UWindowEditControl', 10, 350, 270, 1));
	MineLS.SetText("Mines Life Span");
	MineLS.SetNumericOnly(True);
	MineLS.SetNumericFloat(False);
	MineLS.SetMaxLength(3);
	MineLS.Align = TA_Left;
	MineLS.SetValue(String(class'NWMutator'.default.MinesLifeSpan));
	MineLS.EditBoxWidth = WinWidth / 8;

	bFlameDet = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 380, 270, 1));
	bFlameDet.SetText("Flames Full Detail");
	bFlameDet.bChecked = class'NWMutator'.default.bFlamesFDetail;

	bFlameBall = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 400, 270, 1));
	bFlameBall.SetText("Use FlameTracker fireBall as 2nd mode");
	bFlameBall.bChecked = class'NWMutator'.default.bFlameTFireBall;

	bGravFlyHax = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 430, 270, 1));
	bGravFlyHax.SetText("Enable Graviton flying ability hack");
	bGravFlyHax.bChecked = class'NWMutator'.default.bGravitonFlyHack;

	bXMissile = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 460, 270, 1));
	bXMissile.SetText("Enable MultiMissile Launcher X-Missile");
	bXMissile.bChecked = class'NWMutator'.default.EnableXMissile;

	bWeapLight = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 490, 270, 1));
	bWeapLight.SetText("Enable Weapons Dynamic Light");
	bWeapLight.bChecked = class'NWMutator'.default.bWeaponsDynLight;

	bAmmoLight = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 510, 270, 1));
	bAmmoLight.SetText("Enable Ammo Dynamic Light");
	bAmmoLight.bChecked = class'NWMutator'.default.bAmmoDynLight;

	bPickLight = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 530, 270, 1));
	bPickLight.SetText("Enable Pickups Dynamic Light");
	bPickLight.bChecked = class'NWMutator'.default.bPickupsDynLight;

	bChargLight = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 550, 270, 1));
	bChargLight.SetText("Enable Chargers Dynamic Light");
	bChargLight.bChecked = class'NWMutator'.default.bChargersDynLight;

	MegaTime = UWindowEditControl(CreateControl(class'UWindowEditControl', 10, 580, 270, 1));
	MegaTime.SetText("Multiple Mega Weapons Cicle Time");
	MegaTime.SetNumericOnly(True);
	MegaTime.SetNumericFloat(False);
	MegaTime.SetMaxLength(3);
	MegaTime.Align = TA_Left;
	MegaTime.SetValue(String(class'NWMutator'.default.MultiMegaRespawnTime));
	MegaTime.EditBoxWidth = WinWidth / 8;


}



function Notify(UWindowDialogControl C, byte E)
{

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

				case MineLS: 
					class'NWMutator'.default.MinesLifeSpan = Int(MineLS.GetValue());
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case MegaTime: 
					class'NWMutator'.default.MultiMegaRespawnTime = Int(MegaTime.GetValue());
					class'NWMutator'.static.StaticSaveConfig();
					break;

				case WRERepl:
					class'NWMutator'.default.WRE_replace_Enforcer = WRERepl.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bMineChain:
					class'NWMutator'.default.bMineExplosionChain = bMineChain.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bFlames:
					class'NWMutator'.default.EnableFTrackerFlames = bFlames.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bCColDet:
					class'NWMutator'.default.bCoronasCollisionDetail = bCColDet.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bMineID:
					class'NWMutator'.default.bMineID_InTeamGames = bMineID.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bCybotID:
					class'NWMutator'.default.bCybotID_InTeamGames = bCybotID.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bMegaID:
					class'NWMutator'.default.bMegaTonID_InTeamGames = bMegaID.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bCorpseOver:
					class'NWMutator'.default.EnableCorpseOverlayers = bCorpseOver.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case MHBases:
					class'NWMutator'.default.bMHChargers = MHBases.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case WeapBases:
					class'NWMutator'.default.bWeaponChargers = WeapBases.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case PickBases:
					class'NWMutator'.default.bPickupChargers = PickBases.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bLightsFX:
					class'NWMutator'.default.EnableChargersLightsFX = bLightsFX.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bOldSkoolRep:
					class'NWMutator'.default.ReplaceOldSkoolWeapons = bOldSkoolRep.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bRX:
					class'NWMutator'.default.bRXServerConfig = bRX.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bRXBases:
					class'NWMutator'.default.EnableRXChargers = bRXBases.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bFlameDet:
					class'NWMutator'.default.bFlamesFDetail = bFlameDet.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bFlameBall:
					class'NWMutator'.default.bFlameTFireBall = bFlameBall.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bGravFlyHax:
					class'NWMutator'.default.bGravitonFlyHack = bGravFlyHax.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bXMissile:
					class'NWMutator'.default.EnableXMissile = bXMissile.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bWeapLight:
					class'NWMutator'.default.bWeaponsDynLight = bWeapLight.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bAmmoLight:
					class'NWMutator'.default.bAmmoDynLight = bAmmoLight.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bPickLight:
					class'NWMutator'.default.bPickupsDynLight = bPickLight.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case bChargLight:
					class'NWMutator'.default.bChargersDynLight = bChargLight.bChecked;
					class'NWMutator'.static.StaticSaveConfig();
					break;
			}				
		break;
	}
}


