//=============================================================================
// XPickupsMenuPage.
//=============================================================================
class XPickupsMenuPage expands UMenuPageWindow;

var UWindowCheckBox bCColor, bCOpaque;
var UWindowEditControl CRed, CGreen, CBlue;

function Created()
{
	bCOpaque = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 10, 130, 1));
	bCOpaque.SetText("Opaque Counters");
	bCOpaque.bChecked = Class'UBersDefault'.default.bOpaqueCounters;

	bCColor = UWindowCheckBox(CreateControl(class'UWindowCheckBox', 10, 40, 130, 1));
	bCColor.SetText("Custom Counters Color");
	bCColor.bChecked = Class'UBersDefault'.default.bCountersCustomColor;

	CRed = UWindowEditControl(CreateControl(class'UWindowEditControl', 10, 55, 130, 1));
	CRed.SetText("Custom Red");
	CRed.SetNumericOnly(True);
	CRed.SetNumericFloat(False);
	CRed.SetMaxLength(3);
	CRed.Align = TA_Left;
	CRed.SetValue(String(Class'UBersDefault'.default.CustomCountersColor.R));
	CRed.EditBoxWidth = WinWidth / 8;

	CGreen = UWindowEditControl(CreateControl(class'UWindowEditControl', 10, 70, 130, 1));
	CGreen.SetText("Custom Green");
	CGreen.SetNumericOnly(True);
	CGreen.SetNumericFloat(False);
	CGreen.SetMaxLength(3);
	CGreen.Align = TA_Left;
	CGreen.SetValue(String(Class'UBersDefault'.default.CustomCountersColor.G));
	CGreen.EditBoxWidth = WinWidth / 8;

	CBlue = UWindowEditControl(CreateControl(class'UWindowEditControl', 10, 85, 130, 1));
	CBlue.SetText("Custom Blue");
	CBlue.SetNumericOnly(True);
	CBlue.SetNumericFloat(False);
	CBlue.SetMaxLength(3);
	CBlue.Align = TA_Left;
	CBlue.SetValue(String(Class'UBersDefault'.default.CustomCountersColor.B));
	CBlue.EditBoxWidth = WinWidth / 8;
}



function Notify(UWindowDialogControl C, byte E)
{
local byte b;

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

				case CRed:
					Class'UBersDefault'.default.CustomCountersColor.R = Byte(CRed.GetValue());
					Class'UBersDefault'.static.StaticSaveConfig();
					break;
				case CGreen:
					Class'UBersDefault'.default.CustomCountersColor.G = Byte(CGreen.GetValue());
					Class'UBersDefault'.static.StaticSaveConfig();
					break;
				case CBlue:
					Class'UBersDefault'.default.CustomCountersColor.B = Byte(CBlue.GetValue());
					Class'UBersDefault'.static.StaticSaveConfig();
					break;


				case bCColor:
					Class'UBersDefault'.default.bCountersCustomColor = bCColor.bChecked;
					Class'UBersDefault'.static.StaticSaveConfig();
					break;
				case bCOpaque:
					Class'UBersDefault'.default.bOpaqueCounters = bCOpaque.bChecked;
					Class'UBersDefault'.static.StaticSaveConfig();
					break;
			}				
		break;
	}
}


