require( "scripts/style" );



TitleFont = {
  buttonFont,
  50,
  Color(140,140,140,255)
};


MakeDialog
{
	-- Name the modal dialog
	name="creditswindow",
	Bitmap
	{
		image="images/main/mainbg",
		Bitmap
		{
			image="images/main/bgbar", x=0, y=259
		};
		Bitmap
		{
			image="backgrounds/credits_bg", x=340, y=30
		};
		
		Text
		{
			font = TitleFont,
			name = "title",
			x=kCenter+150,y=86,w=kMax ,h=75,
			flags = kHAlignCenter + kVAlignTop,
			label = "credits"
		};

		CreditsWindow
		{
			--x = 260, y = 150,
			--w = 800, h = 440,
			x = 0, y = 0,
			w = 1024, h = 768,
			font = buttonFont,
			fontsize = 16,
			fontcolor = BlackColor,
			headercolor = Color(140,140,140,255),
			columngap = 50,
			columnwidth = 325,
			creditsTopLeftX=310,
			creditsTopLeftY=160,
			time = 20000, 		-- Time to play credits in milliseconds
			intropause = 3000, 	-- Time to pause credits at start, in ms
			file = "credits/credits.txt",
		},

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

		SetStyle(ButtonStyle),
		Button
		{
			x=kCenter+400,
			y=kMax-158,
			name="back",
			default=true,
			cancel=true,
			graphics={
				"buttons/button_nextup",
				"buttons/button_nextdown",
				"buttons/button_nextover",
			},
			command =
				function()
					PopModal("creditswindow");
				end
		};
	},
}