require( "scripts/style.lua" );

function   PushPlayButt ( )
		ss = GetLIComicsName();
		if(ss == "") then
			if(not(StartSoundFade == nil)) then StartSoundFade(); end	
			CSWithSh("PrMap", "scripts/map.lua");
			DoModal("scripts/shadow.lua");
		else
			SetSplashInfo( ss,  GetLIComicsPictName(), "scripts/map.lua");
			if(not(StartSoundFade == nil)) then StartSoundFade(); end
			CSWithSh("PrMap", "scripts/splashstart.lua");
			DoModal("scripts/shadow.lua");
		end		
end

MakeDialog
{
	name="PrMap", -- Remember, this is like saying table['name']=name, so it works.
	PrMap
	{
		x=0,y=0,w=kMax,h=kMax,
		infos = "prmap",
		
		music= "audio/music/progress_map.ogg",
		ambient = "",
		
		Text
		{
			name = "ttl1",
			font = {  standardFont, 38,  Color(86,63,21,55)},
			x=3,y=25,w=1024,h=85,
			flags = kHAlignCenter + kVAlignCenter,
			label = "prmapTitle"
		};
		Text
		{
			name = "ttl1",
			font = {  standardFont, 38,  Color(86,63,21,255)},
			x=0,y=22,w=1024,h=85,
			flags = kHAlignCenter + kVAlignCenter,
			label = "prmapTitle"
		};
		Text
		{
			name = "art1",
			font = {  standardFont, 20,  Color(25,25,18,255)},
			x=311,y=113,w=100,h=85,
			flags = kHAlignLeft + kVAlignTop,
			label = "prmapArts"
		};
		Text
		{
			name = "art1",
			font = {  standardFont, 20,  Color(255,255,184,255)},
			x=310,y=112,w=100,h=85,
			flags = kHAlignLeft + kVAlignTop,
			label = "prmapArts"
		};


		Button
		{
			x=60, 	y=682,
			name="menu",
			parent = DefaultStyle,
			sound = kDefaultButtonSound, type= kPush,
			graphics = {"buttons/prmap/b_menu",	"buttons/prmap/b_menu_pressed",	"buttons/prmap/b_menu_mouseover"},
			command=
				function()
						if(not(StartSoundFade == nil)) then StartSoundFade(); end
						CSWithSh("PrMap", "scripts/mainmenu.lua");
						DoModal("scripts/shadow.lua");
				end
		},

		Button
		{
			x=795, y=682,
			name="next",
			parent = DefaultStyle,
			sound = kDefaultButtonSound, type= kPush,
			graphics = {"buttons/prmap/b_play",	"buttons/prmap/b_play_pressed",	"buttons/prmap/b_play_mouseover"},
			command = PushPlayButt,
				--function()
				  
						--ss = GetLIComicsName();
						--if(ss == "") then
							--if(not(StartSoundFade == nil)) then StartSoundFade(); end	
							--CSWithSh("PrMap", "scripts/map.lua");
							--DoModal("scripts/shadow.lua");
						--else
							--SetSplashInfo( ss,  GetLIComicsPictName(), "scripts/map.lua");
							--if(not(StartSoundFade == nil)) then StartSoundFade(); end
							--CSWithSh("PrMap", "scripts/splashstart.lua");
							--DoModal("scripts/shadow.lua");
						--end		
				--end
		},
	},

} -- MakeDialog
