require "scripts/style"



TitleFont = {
  creditsFont,
  70,
  WhiteColor
};


MakeDialog
{
	-- Name the modal dialog
	name="creditswindow",
	Bitmap
	{
		image="backgrounds/creditsscreen",

--		Text
--		{
--			font = TitleFont,
--			name = "title",
--			x=kCenter,y=60,w=kMax ,h=75,
--			flags = kHAlignCenter + kVAlignTop,
--			label = "credits"
--		};

		CreditsWindow
		{
			x = kCenter, y = kCenter,
			w = 1024, h = 768,
			font = creditsFont,
			fontsize = 16,
			fontcolor = WhiteColor,
			headercolor = BlueColor,
			columngap = 125,
			columnwidth = 325,
			time = 60000, 		-- Time to play credits in milliseconds
			intropause = 0, 	-- Time to pause credits at start, in ms
			file = "credits/credits.txt",
		},

		--Text
		--{
		--	flags=kHAlignCenter + kVAlignTop,
		--	x=0,y=kMax-22,
		--	w=kMax;h=39;
		--	label="#"..GetString("version",GetConfig(kGameVersion)) ;
		--};

		SetStyle(ButtonStyle),
		Button
		{
			sound = "audio/sfx/Menu_Click01.ogg",
			x=kCenter+200,
			y=kMax-80,
			name="back",
			default=true,
			cancel=true,
			label="back",
			command =
				function()
					if(GetIsFromOptions()) then
						SetIsFromOptions(false)			
						PopModal("creditswindow")
					else
						SwapToModal("scripts/mainmenu.lua");
					end
				end
		};
	},
}