require( "scripts/style.lua" );

ProfileFont = {
  standardFont,
  18,
  BlackColor
};

-- Function to create N buttons

function CreateButtons( N )

	t = { BeginGroup() };

	for i = 0,N-1 do
		table.insert(t,
			Button{
				name="profile"..i,
				label="new",
				x=215,
				y=175+(80*i),
				type = kRadio,
				graphics = {
					"screens/title/profile/profile01.png",
					"screens/Title/state3.png",
					"screens/Title/state2.png",
					"screens/Title/state4.png"
				},
			}
		);
	end

	return Group(t);
end

-- Create the profiles window

MakeDialog
{
		
	Bitmap {
		
		name="backgroundimage",
		image="screens/title/profile/bg.png",
		
		ProfilesWindow {
			
			name="ProfilesWindow",
				
			x=kCenter,
			y=kCenter,
			w = 1024,
			h = 768,
			
			BeginGroup();
			
			Button{
				name="profile0",
				label="new",
				x=272,
				y=159,
				font = ProfileFont,
				flags = kVAlignCenter + kHAlignCenter,
				type = kRadio,
				mask = "screens/title/profile/profile01_mask.png",
				graphics = {
					"screens/title/profile/profile01_off.png",
					"screens/title/profile/profile01_on.png",
					"screens/title/profile/profile01_off.png",
					"screens/title/profile/profile01_on.png",
				},
			},
			
			Button{
				name="profile1",
				label="new",
				x=269,
				y=232,
				font = ProfileFont,
				flags = kVAlignCenter + kHAlignCenter,
				type = kRadio,
				mask = "screens/title/profile/profile02_mask.png",
				graphics = {
					"screens/title/profile/profile02_off.png",
					"screens/title/profile/profile02_on.png",
					"screens/title/profile/profile02_off.png",
					"screens/title/profile/profile02_on.png",
				},
			},
			
			Button{
				name="profile2",
				label="new",
				x=266,
				y=305,
				font = ProfileFont,
				flags = kVAlignCenter + kHAlignCenter,
				type = kRadio,
				mask = "screens/title/profile/profile03_mask.png",
				graphics = {
					"screens/title/profile/profile03_off.png",
					"screens/title/profile/profile03_on.png",
					"screens/title/profile/profile03_off.png",
					"screens/title/profile/profile03_on.png",
				},
			},
			
			Button{
				name="profile3",
				label="new",
				x=269,
				y=395,
				font = ProfileFont,
				flags = kVAlignCenter + kHAlignCenter,
				type = kRadio,
				mask = "screens/title/profile/profile04_mask.png",
				graphics = {
					"screens/title/profile/profile04_off.png",
					"screens/title/profile/profile04_on.png",
					"screens/title/profile/profile04_off.png",
					"screens/title/profile/profile04_on.png",
				},
			},
			
			Button{
				name="profile4",
				label="new",
				x=272,
				y=469,
				font = ProfileFont,
				flags = kVAlignCenter + kHAlignCenter,
				type = kRadio,
				mask = "screens/title/profile/profile05_mask.png",
				graphics = {
					"screens/title/profile/profile05_off.png",
					"screens/title/profile/profile05_on.png",
					"screens/title/profile/profile05_off.png",
					"screens/title/profile/profile05_on.png",
				},
			},
			
			-- Slider
			-- {
			-- 	x=678,
			-- 	y=176,
			-- 	w=22,
			-- 	h=350,
			-- 	name="slider",
			-- 	railtop="screens/title/profile/slider_rail.png",
			-- 	railmid="screens/title/profile/slider_rail.png",
			-- 	railbot="screens/title/profile/slider_rail.png",
			-- 	sliderimage="screens/title/profile/slider_off.png",
			-- 	sliderrollimage="screens/title/profile/slider_on.png",
			-- },
			
			SetStyle( MenuButtonStyle ),
			
			Button
			{
				x=89,
				y=687,
				name="new",
				MenuButtonLabel("new"),
				type = kPush,
				mask = "screens/title/profile/new_mask.png",
				graphics = {
					"screens/title/profile/new_off.png",
					"screens/title/profile/new_on.png",
					"screens/title/profile/new_off.png",
				}
			},
			
			Button
			{
				x=295,
				y=687,
				name="delete",
				MenuButtonLabel("delete"),
				type = kPush,
				mask = "screens/title/profile/delete_mask.png",
				graphics = {
					"screens/title/profile/delete_off.png",
					"screens/title/profile/delete_on.png",
					"screens/title/profile/delete_off.png",
				}
			},
			
			Button
			{
				x=493,
				y=688,
				name="rename",
				MenuButtonLabel("rename"),
				type = kPush,
				mask = "screens/title/profile/rename_mask.png",
				graphics = {
					"screens/title/profile/rename_off.png",
					"screens/title/profile/rename_on.png",
					"screens/title/profile/rename_off.png",
				}
			},
			
			Button
			{
				x=692,
				y=687,
				name="validate",
				MenuButtonLabel("validate"),
				type = kPush,
				close = true,
				mask = "screens/title/profile/valid_mask.png",
				graphics = {
					"screens/title/profile/valid_off.png",
					"screens/title/profile/valid_on.png",
					"screens/title/profile/valid_off.png",
				}
			},
			
		},
		
	},
		
} -- MakeDialog