//=============================================================================
// NaliWCrossMenuPage.
//=============================================================================
class NaliWCrossMenuPage expands UMenuPageWindow;

var UWindowCheckBox bCCross, bCColor, bOpaqC;
var UWindowHSliderControl WeapDistDet, AmmoDistDet, PickDistDet, ChargDistDet;

function AfterCreate()
{
    Super.AfterCreate();

    DesiredWidth = 220;
    DesiredHeight = 230;
}

function Created()
{
	bCCross = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 10, 270, 1));
	bCCross.SetText("Enable Custom Crosshair Style");
	bCCross.bChecked = class'NaliWeapons'.default.bCustomCrosshair;

	bCColor = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 40, 270, 1));
	bCColor.SetText("Enable Custom Crosshair Color");
	bCColor.bChecked = class'NaliWeapons'.default.bCustomColor;

	bOpaqC = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 70, 270, 1));
	bOpaqC.SetText("Opaque Custom Crosshair");
	bOpaqC.bChecked = class'NaliWeapons'.default.bOpaqueCrosshair;

	WeapDistDet = UWindowHSliderControl(CreateControl(class'UWindowHSliderControl', 10, 120, 245, 1));
    	WeapDistDet.bNoSlidingNotify = True;
    	WeapDistDet.SetRange(32, 255, 1);
    	WeapDistDet.SetText("Weapons Distance Detail");
	WeapDistDet.SetValue(class'NWMutator'.default.WeaponDistDetail);

	AmmoDistDet = UWindowHSliderControl(CreateControl(class'UWindowHSliderControl', 10, 140, 245, 1));
    	AmmoDistDet.bNoSlidingNotify = True;
    	AmmoDistDet.SetRange(32, 255, 1);
    	AmmoDistDet.SetText("Ammo Distance Detail");
	AmmoDistDet.SetValue(class'NWMutator'.default.AmmoDistDetail);

	PickDistDet = UWindowHSliderControl(CreateControl(class'UWindowHSliderControl', 10, 160, 245, 1));
    	PickDistDet.bNoSlidingNotify = True;
    	PickDistDet.SetRange(32, 255, 1);
    	PickDistDet.SetText("Pickups Distance Detail");
	PickDistDet.SetValue(class'NWMutator'.default.PickupsDistDetail);

	ChargDistDet = UWindowHSliderControl(CreateControl(class'UWindowHSliderControl', 10, 180, 245, 1));
    	ChargDistDet.bNoSlidingNotify = True;
    	ChargDistDet.SetRange(32, 255, 1);
    	ChargDistDet.SetText("Chargers Distance Detail");
	ChargDistDet.SetValue(class'NWMutator'.default.ChargersDistDetail);
}



function Notify(UWindowDialogControl C, byte E)
{

	switch(E) {
		case DE_Change: // the message sent by sliders and checkboxes
			switch(C) 
			{
				case bCCross:
					class'NaliWeapons'.default.bCustomCrosshair = bCCross.bChecked;
					class'NaliWeapons'.static.StaticSaveConfig();
					break;
				case bCColor:
					class'NaliWeapons'.default.bCustomColor = bCColor.bChecked;
					class'NaliWeapons'.static.StaticSaveConfig();
					break;
				case bOpaqC:
					class'NaliWeapons'.default.bOpaqueCrosshair = bOpaqC.bChecked;
					class'NaliWeapons'.static.StaticSaveConfig();
					break;
				case WeapDistDet:
					class'NWMutator'.default.WeaponDistDetail = Byte(WeapDistDet.GetValue());
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case AmmoDistDet:
					class'NWMutator'.default.AmmoDistDetail = Byte(AmmoDistDet.GetValue());
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case PickDistDet:
					class'NWMutator'.default.PickupsDistDetail = Byte(PickDistDet.GetValue());
					class'NWMutator'.static.StaticSaveConfig();
					break;
				case ChargDistDet:
					class'NWMutator'.default.ChargersDistDetail = Byte(ChargDistDet.GetValue());
					class'NWMutator'.static.StaticSaveConfig();
					break;

			}				
		break;
	}
}


