require( "scripts/style.lua" )

NameColor = Color(255,255,255,255);

NameFont = {
  standardFont,
  25,
  NameColor
};

TableInfoFont = {
  standardFont,
  30,
 BlackColor
};

ErrorFont = {
  standardFont,
  24,
 BlackColor
};

AccountFont = {
  standardFont,
  24,
  BlackColor
};

ScoreFont = {
  standardFont,
  29,
  BlackColor
};

kPlayerNameY = 150;
kScoreY = 200;
kYourPFAccountY = 235;
kAccountNameY = 275;
kPasswordY = 310;
kRememberY = 350;

xoff = 40
yoff = 22

MakeDialog
{
	
	Bitmap
	{ 
		image="backgrounds/submitdialog",	
		x=kCenter,
		y=kCenter,

		Text
		{
			font = DialogTitleFont,
			name = "header",
			x=0,y=83+yoff,w=kMax,h=kMax,
			flags = kHAlignCenter + kVAlignTop,
			label = "submitglobal"
		};
		
		Text
		{
			font = AccountFont,
			name = "playertext",
			x=0+xoff,y=kPlayerNameY+6+yoff,w=145,h=kMax,
			flags = kHAlignRight + kVAlignTop,
			label = "playerlabel"
		};
		
		Text
		{
			font = AccountFont,
			name = "yourscore",
			x=xoff,y=kScoreY+yoff-7,w=142,h=kMax,
			flags = kHAlignRight + kVAlignTop,
			label = "scorelabel"
		};
		
		Text
		{
			font = ScoreFont,
			name = "eligiblescore",
			x=154+xoff,y=kScoreY+yoff-9,w=100,h=kMax,
			flags = kHAlignLeft + kVAlignTop,
			label = "12345"
		};
		
		Text
		{
			font = ScoreFont,
			name = "yourpfaccount",
			x=105+xoff,y=kYourPFAccountY+yoff+6,w=250,h=kMax,
			flags = kHAlignLeft + kVAlignTop,
			label = "yourpfaccount"
		};
		
		Text
		{
			font = AccountFont,
			name = "nametext",
			x=0+xoff,y=kAccountNameY+6+yoff,w=145,h=kMax,
			flags = kHAlignRight + kVAlignTop,
			label = "namelabel"
		};
		
		Text
		{
			font = AccountFont,
			name = "passtext",
			x=0+xoff,y=kPasswordY+6+yoff,w=145,h=kMax,
			flags = kHAlignRight + kVAlignTop,
			label = "passwordlabel"
		};
		
		Text
		{
			font = TableInfoFont,
			name = "submitconnect",
			x=0+xoff,y=0+yoff,w=kMax-xoff,h=kMax,
			flags = kHAlignCenter + kVAlignCenter,
			label = "connectingtoserver"
		};
		
		Text
		{
			font = ErrorFont,
			name = "submiterror",
			x=0+xoff,y=0+yoff,w=kMax-xoff,h=kMax,
			flags = kHAlignCenter + kVAlignCenter,
			label = "Error Message"
		};

		Text
		{
			font = StandardButtonFont,
			name = "rememberlabel",
			x=75+xoff+55,
			y=kRememberY+yoff+6,
			w=240,
			h=50,
			flags = kHAlignLeft + kVAlignCenter,
			label="rememberpfaccount",
		};		

		Bitmap
		{
			name="nameeditbox",
			image="backgrounds/textfield.png",
			x=155+xoff,
			y=kPlayerNameY+yoff,
			
			TextEdit
			{
				font = NameFont,
				name = "nameedit",
				x=7,y=5,w=kMax,h=kMax,
				length=12,
				ignore = kIllegalNameChars
				
			};
		};
		
		Bitmap
		{
			name="accounteditbox",
			image="backgrounds/textfield.png",
			x=155+xoff,
			y=kAccountNameY+yoff,
			
			TextEdit
			{
				font = NameFont,
				name = "accountedit",
				x=7,y=5,w=kMax,h=kMax,
				length=26,
				ignore = kIllegalNameChars
				
			};
		};
		
		Bitmap
		{
			name="passeditbox",
			image="backgrounds/textfield.png",
			x=155+xoff,
			y=kPasswordY+yoff,
			
			TextEdit
			{
				font = NameFont,
				name = "passedit",
				x=7,y=5,w=kMax,h=kMax,
				password = true,
				length=26
				
			};
		};
		
		
		Button
		{
			font = StandardButtonFont,
			graphics = CheckboxButtonGraphics,
			name="remember",
			type = kToggle,
			x=75+xoff,
			y=kRememberY+yoff+6,
			w=250,
			scale=1.0,
			rollover = "",
			drop = false,
			sound = "audio/sfx/checkbox.ogg",
		};
	
		Button
		{
			x=50+xoff,
			y=413+yoff,
			font = StandardButtonFont,
			graphics = StandardButtonGraphics,
			name="submittoserver",
			label="submit",
			type = kPush
		},
		
		Button
		{
			x=220+xoff,
			y=413+yoff,
			font = StandardButtonFont,
			graphics = StandardButtonGraphics,
			name="submitcancel",
			label="cancel",
			type = kPush
		};
		
		Button
		{
			x=150+xoff,
			y=313+yoff,
			font = StandardButtonFont,
			graphics = StandardButtonGraphics,
			name="submiterrorok",
			label="ok",
			type = kPush
		};
	}
}