require "scripts/style"
---------------------------------------
-- 				Main Dialog
---------------------------------------
MakeDialog
{
	-- Name the modal dialog
	name = "creditswindow",
	Bitmap
	{
		image = "backgrounds/dialogs/dialogcredits",
		x = kCenter,
		ColorShadowColorText(kMax,
								75,
								0,
								60,
								70,
								"credits", 
								DefaultColor, 
								DefaultShadowColor,
								"credits",
								kDefaultButtonFontShadowSize,
								kHAlignCenter + kVAlignCenter,
								defaultFont);
				
		CreditsWindow
		{
			x = 100, 
			y = 150,
			w = kMax - 100, 
			h = kMax - 100,
			font = defaultFont,
			fontsize = 16,
			fontcolor = BlackColor,
			headercolor = DarkBlueColor,
			columngap = 50,
			columnwidth = 325,
			time = 20000, 		-- Time to play credits in milliseconds
			intropause = 3000, 	-- Time to pause credits at start, in ms
			file = "credits/credits.txt",
		},

		ColorShadowColorText(kMax,
								75,
								15,
								kMax - 60,
								30,
								"#"..GetString("version",GetConfig(kGameVersion)), 
								DefaultColor, 
								DefaultShadowColor,
								"version",
								kDefaultButtonFontShadowSize,
								kHAlignLeft + kVAlignCenter,
								defaultFont);
		
		SetStyle(ButtonStyle),
		Button
		{
			name = "back",
			x = kCenter,
			y = kMax - 120,
			default = true,
			cancel = true,
			DefaultButtonLabel("back"),
			command =
				function()
					PopModal("creditswindow");
				end
		};
		-- Sound	
		createSound(),
	},
}