-- wndcredits.lua

require("scripts/style.lua");
require("scripts/styles/mainmenustyle.lua");

posX = 0;
posY = 0;
offsetX = 0;

titleOffsetX = 170;
titleOffsetY = 57;

MakeDialog
{
	name = "dlgCredits",
	w = 500,	h=768,
	
	
	Bitmap
	{
	
		image = "common/screens/basics_credits/basics_background",
		x = kCenter, y = kCenter,
	
		Bitmap
		{
			-- Set the background image
			image = "common/screens/basics_credits/basics_box",
			x = kCenter + 10,
			y = kCenter,
			
			SetStyle(CreditsTitleStyle),
	
			Text
			{
				label = "menu_credits_title",
				x = titleOffsetX, y = titleOffsetY,
				w = 275, h = 55,
				flags = kHAlignCenter + kVAlignCenter,
			},
			
			SetStyle(CreditsContentStyle),
			
			-- Create our main credits window
			WndCredits
			{
				x = 0, y = 0, 
				w = width, h = height,
				
				-- Properties for creating the text graphics from C++
				creditsFile = "credits/credits.txt",
				font = "fonts/arial_rounded.mvec",
				fontSize = 35,
				color = Color(255, 255, 255, 255),
				initialPosY = 365,
				initialPosX = -205,
				finalPosY = 100,
				speed = 50.0
			},
	
			
		},

		SetStyle(InternalButtonStyle),

		BlgButton
		{
			--x = (posX + offsetX), y = posY,
			x = 420, y = 550,
            label = "backtogame",
	        width = 400, height = 200,
			positionMatrix = { x = 10, y = 10},
			graphics =
			{
				"common/screens/button/basic_button",
				"",
				"",
				"",
			},
			close = true,
		    command =
		        function()
		        	--FadeOut();
		        end			
		},
	}
}
