require( "scripts/style.lua" );

SlotListTextFont = {
  oldsansblackFont,
  19,
  RedTextColor
};

SlotNotSelectedListTextFont = {
  oldsansblackFont,
  30,
  RedTextColor
};


kSlotPositionX = 210;
kSlotPositionY = 176;
kSlotPositionSpacing = 50;

MakeDialog
{
	name="profilemanagerwindow",
FaderWindow
	{
align=kHAlignLeft + kVAlignTop,
		x = 0;
		y = 0;
		wait=0,
		duration=100,
		fit = true,
		Bitmap
		{
			image = "backgrounds/back",
			fit=true,
			ProfileManagerWindow
			{
				name="profilemanager",
				image = "gui/profilemanager/profile_manager_background",
				x=245,
				y=151,
				fit=true,
				SetStyle( MenuButtonStyle ),
				Text
				{
					x = 152,
					y = 138,
					w = 357,
					h = 33,
					font = {
						oldsansblackFont,
						30,
						BlackColor
					},
					label = "profilemanager",
					flags = kHAlignCenter + kVAlignCenter;
				},
				--SetStyle( MenuButtonStyle ),
				Button
				{
					name = "menudone",
					x=214,
					y=460,
					w=150,
					h=40,
					graphics = MediumButton1Graphics,
					MenuButtonLabel(0,0,143,32, "ok", oldsansblackFont, 20, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
					close = true,
					command=
						function()
							SaveProfiles();
							RefreshProfileName();
						end
				},
				Button
				{
					name = "menueditname",
					x=59,
					y=365,
					w=118,
					h=33,
					graphics = SmallButton2Graphics,
					MenuButtonLabel(0,0,111,26, "editname", oldsansblackFont, 20, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
					command=
						function()
							DisplayDialog{"scripts/editname.lua"};
						end
				},
				Text
				{
	align=kHAlignLeft + kVAlignTop,
					name = "currentprogress",
					x = 44,
					y = 168,
					w = 145,
					h = 30,
					font = {
						oldsansblackFont,
						20,
						RedTextColor
					},
					label = "yourcurrentprogress",
					flags = kHAlignCenter + kVAlignCenter;
				},
				--Bitmap(FamilySymbol(297,304,1)),
				Bitmap
				{
					name = "progressborder",
					image = "gui/profilemanager/square_red_glow",
					x=44,
					y=193,
				},
				Bitmap
				{
					name = "familyphoto",
					image = "gui/commons/family5",
					x=50,
					y=208,
					scale = 0.50
				},
				Bitmap
				{
					name = "calendar",
					image = "gui/commons/calendar",
					x=86,
					y=251,
					Text
					{
						name = "day",
						font = {
							oldsansblackFont,
							13,
							BlackColor
						},
						x = 15,
						y = 12,
						w = 26,
						h = 13,
						flags = kHAlignCenter,
						label = "day",
					},
					SetStyle(DialogBodyText),
					Text
					{
						name = "number_of_day",
						label = "#1",
						x = 12,
						y = 29,
						w = 29,
						h = 17,
						font = {
							oldsansblackFont,
							13,
							BlackColor
						},
						flags = kHAlignCenter+kVAlignCenter,
					}
				},
				Button
				{
					name = "menunew",
					x=59,
					y=332,
					w=118,
					h=33,
					graphics = SmallButton2Graphics,
					MenuButtonLabel(0,0,111,26,"new", oldsansblackFont, 20, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
					command=
						function()
							DisplayDialog{"scripts/newnameprofiles.lua"};
						end
				},
				Button
				{
					name = "menudelete",
					x=59,
					y=398,
					w=118,
					h=33,
					graphics = SmallButton2Graphics,
					MenuButtonLabel(0,0,111,26, "delete", oldsansblackFont, 20, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
					command=
						function()
							DisplayDialog
							{
								"scripts/confirm.lua",
								yes=function()
								DeleteProfile();
								end,
								no=function()
								--DeleteProfile()
								end,
								title = "deleteconfirmtitle",
								body = "deleteconfirm"
							};
						end,
				},
				BeginGroup();
				Button
				{
					name = "slot1",
					type = kRadio,
					x=kSlotPositionX,
					y=kSlotPositionY + kSlotPositionSpacing*0,
					w=151,
					h=36,
					graphics = {
						"buttons/profile_button_normal",
						"buttons/profile_button_down",
						"buttons/profile_button_over",
						"buttons/profile_button_down",
					},
					command=
						function()
							SelectSlot(0);
						end,
					Text
					{
						name = "slotname",
						font = SlotNotSelectedListTextFont,
						x=50,
						y=15,
						w=220,
						h=36,
						flags = kHAlignCenter + kVAlignCenter,
					},
				},
				Button
				{
					name = "slot2",
					type = kRadio,
					x=kSlotPositionX,
					y=kSlotPositionY + kSlotPositionSpacing*1,
					w=151,
					h=36,
					graphics = {
						"buttons/profile_button_normal",
						"buttons/profile_button_down",
						"buttons/profile_button_over",
						"buttons/profile_button_down",
					},
					command=
						function()
							SelectSlot(1);
						end,
					Text
					{
						name = "slotname",
						font = SlotNotSelectedListTextFont,
						x=50,
						y=15,
						w=220,
						h=36,
						flags = kHAlignCenter + kVAlignCenter,
					},
				},
				Button
				{
					name = "slot3",
					type = kRadio,
					x=kSlotPositionX,
					y=kSlotPositionY + kSlotPositionSpacing*2,
					w=151,
					h=36,
					graphics = {
						"buttons/profile_button_normal",
						"buttons/profile_button_down",
						"buttons/profile_button_over",
						"buttons/profile_button_down",
					},
					command=
						function()
							SelectSlot(2);
						end,
					Text
					{
						name = "slotname",
						font = SlotNotSelectedListTextFont,
						x=50,
						y=15,
						w=220,
						h=36,
						flags = kHAlignCenter + kVAlignCenter,
					},
				},
				Button
				{
					name = "slot4",
					type = kRadio,
					x=kSlotPositionX,
					y=kSlotPositionY + kSlotPositionSpacing*3,
					w=151,
					h=36,
					graphics = {
						"buttons/profile_button_normal",
						"buttons/profile_button_down",
						"buttons/profile_button_over",
						"buttons/profile_button_down",
					},
					command=
						function()
							SelectSlot(3);
						end,
					Text
					{
						name = "slotname",
						font = SlotNotSelectedListTextFont,
						x=50,
						y=15,
						w=220,
						h=36,
						flags = kHAlignCenter + kVAlignCenter,
					},
				},
				Button
				{
					name = "slot5",
					type = kRadio,
					x=kSlotPositionX,
					y=kSlotPositionY + kSlotPositionSpacing*4,
					w=281,
					h=62,
					graphics = {
						"buttons/profile_button_normal",
						"buttons/profile_button_down",
						"buttons/profile_button_over",
						"buttons/profile_button_down",
					},
					command=
						function()
							SelectSlot(4);
						end,
					Text
					{
						name = "slotname",
						font = SlotNotSelectedListTextFont,
						x=50,
						y=15,
						w=220,
						h=36,
						flags = kHAlignCenter + kVAlignCenter,
					},
				},
			},
		},
	},
} -- MakeDialog
