require( "scripts/style.lua" );
ReadFile( "scripts/pflogin.lua");

TitleFont = {
  standardFont,
  30,
  BorderColor
};





SaveTypeFont = {
  standardFont,
  12,
  BorderColor
};

ClickHereFont = {
  standardFont,
  16,
  RedColor
};

WithPFFont= {
  standardFont,
  12,
  BorderColor
};






MakeDialog
{
	Bitmap
	{ 
		image="backgrounds/longdialog",
		x=kCenter,
		y=kCenter,
		
		ServerSaveLogin
		{
			x=0,y=0,w=kMax,h=kMax,
			mode=gSSSGSetupMode,
			Window
			{
				x=0,y=0,w=kMax,h=kMax,
				name="loginwindow",
				Text
				{
					font = TitleFont,
					name = "advancedprofile",
					x=0,y=45,w=kMax,h=30,
					flags = kHAlignCenter + kVAlignTop,
					label = "advancedprofile"
				};
				
				MakeLogin();
				
				Text
				{
					font = ClickHereFont,
					name = "clickhere",
					x=0,y=225,w=kMax,h=60,
					flags = kHAlignCenter + kVAlignTop,
					label = "clickhereforpf",
					factory = "linktext",
				};
				
				Button
				{
					name="pfaccountcreate",
					x=0,y=0,w=0,h=0,
					command = 
						function()
							LaunchAccountCreate();
						end
				};
				
				Text
				{
					font = WithPFFont,
					name = "withpfaccount",
					x=40,y=245,w=kMax-40,h=200,
					flags = kHAlignLeft + kVAlignTop,
					label = "withpfaccount",
					padding=0
				};
				
				Text
				{
					font = WithPFFont,
					name = "pfsavetip",
					x=60,y=430,w=kMax-60,h=200,
					flags = kHAlignLeft + kVAlignTop,
					label = "pfsavetip",
					padding=0
				};
				
				
				BeginGroup();
				Button
				{
					font = BoxFont,
					graphics = CheckboxButtonGraphics,
					name="alwayssave",
					type = kRadio,
					x=30,
					y=320,
					w=kMax,
					scale=0.5,
					rollover = "",
					drop = false,
					sound = "audio/sfx/checkbox.ogg",
					Text
					{
						font = SaveTypeFont,
						name = "alwayssavelabel",
						x=25,
						y=10,
						w=kMax,
						h=kMax,
						flags = kHAlignLeft + kVAlignTop,
						label="alwayssave",
					};
				};
				
				Button
				{
					font = BoxFont,
					graphics = CheckboxButtonGraphics,
					name="asksave",
					type = kRadio,
					x=30,
					y=340,
					w=kMax,
					scale=0.5,
					rollover = "",
					drop = false,
					on = true,
					sound = "audio/sfx/checkbox.ogg",
					Text
					{
						font = SaveTypeFont,
						name = "asksavelabel",
						x=25,
						y=10,
						w=kMax,
						h=kMax,
						flags = kHAlignLeft + kVAlignTop,
						label="asksave",
					};
				};
				
				Button
				{
					font = BoxFont,
					graphics = CheckboxButtonGraphics,
					name="neversave",
					type = kRadio,
					x=30,
					y=360,
					w=kMax,
					scale=0.5,
					rollover = "",
					drop = false,
					sound = "audio/sfx/checkbox.ogg",
					Text
					{
						font = SaveTypeFont,
						name = "neversavelabel",
						x=25,
						y=10,
						w=kMax,
						h=kMax,
						flags = kHAlignLeft + kVAlignTop,
						label="neversave",
					};
				};
				
					
				SetStyle(StandardButtonStyle);
				Button
				{
					x=50,
					y=390,
					name="enterok",
					label="ok",
					default = true,
					scale=0.7,
					command = 
						function()
							RefreshButton("enterok");
							VerifyLoginInfo();
						end
				},
				
				Button
				{
					x=225,
					y=390,
					name="entercancel",
					label="cancel",
					scale=0.7,
					command = 
						function()
							CloseWindow(nil);
						end
				};
				
				SetStyle(DefaultStyle);
			};
			
			MakeDownloadAvailable();
			
			MakeResponseWindow();
			
			
		};
		
		
		
	},
	
	SetFocus( "nameedit" )
}



