-- wndinstructions.lua

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

posX = 400;
posY = (height - 100);
offsetX = 185;

titleOffsetX = 331;
titleOffsetY = 51;

buttonPath = "common/screens/how_to_play/button_green"

MakeDialog
{
	name = "dlgInstructions",

	-- Create our main instructions window
	WndInstructions
	{
		w = kMax,
		h = kMax,
		x = kCenter,
		y = kCenter,
		fit = true,
	
		BlgBitmap
		{
		
			image = "common/screens/basics_credits/basics_background",
			x = kCenter, y = kCenter-2,
			
			-- Set the background image
			Bitmap 
			{
				image = "common/screens/how_to_play/box_how_to_play",
				x = kCenter ,
				y = kCenter,
			
				SetStyle(CreditsTitleStyle),
	
				Text
				{
					label = "menu_basics_title",
					x = titleOffsetX, y = titleOffsetY,
					w = 275, h = 55,
					--font = BasicsTitleFont,
					flags = kHAlignCenter + kVAlignCenter,
				},

				----------------------------------------------------------
				-- this window gets filled with specific how-to content
				----------------------------------------------------------
				Window
				{
					name = "ContentWindow",
					w = width, h = height,
					x = kCenter, y = kCenter + 10,
					fit = true,
				},

				----------------------------------------------------------
				-- how-to screen buttons
				----------------------------------------------------------
				SetStyle(GreenButtonStyle),
				
				BlgButton
				{
					x = 109, y = 98,
	            	label = "basics_button_1",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/basics.lua")
				        end
				},
				
				BlgButton
				{
					
					x = 666, y = 98,
	            	label = "basics_button_2",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/stress.lua")
				        end
				},
				
				BlgButton
				{
					
					x = 718, y = 158,
	            	label = "basics_button_3",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/treat1.lua")
				        end
				},
				
				BlgButton
				{
					
					x = 718, y = 278,
	            	label = "basics_button_4",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/customers1.lua")
				        end
				},
				BlgButton
				{
					
					x = 109, y = 337,
	            	label = "basics_button_9",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/mole.lua")
				        end
				},
				
				BlgButton
				{
					x = 57, y = 158,
	            	label = "basics_button_5",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/upgrades2.lua")
				        end
				},
				
				BlgButton
				{
                    x = 753, y = 218,
	            	label = "basics_button_6",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/minigames.lua")
				        end
				},
				
				BlgButton
				{
					
					x = 20, y = 218,
					
	            	label = "basics_button_7",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/upgrades.lua")
				        end
				},
				
				BlgButton
				{
					
					x = 666, y = 337,
	            	label = "basics_button_8",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/customers2.lua")
				        end
				},
				BlgButton
				{
					x = 57, y = 278,
	            	label = "basics_button_10",
	            	width = 400, height = 200,
					positionMatrix = { x = 10, y = 10},
					graphics = {
						buttonPath,
						"",
						"",
						"",
					},
	            	command =
				        function()
				        	FillContentWindow("scripts/windows/howto/greenpoints.lua")
				        end
				},
			},
		
			----------------------------------------------------------
			-- Close Button
			----------------------------------------------------------
			SetStyle(GreenButtonStyle),
				
			BlgButton
			{
				--x = (posX + offsetX), y = posY,
				x = 412, y = 600,
	           	label = "backtogame",
	           	width = 400, height = 200,
				positionMatrix = { x = 10, y = 10},
				graphics = {
					"common/screens/button/option_green",
					"",
					"",
					"",
				},
				close = true,
			    command =
			        function()
			        	FadeOut();
			        end
			},
		},
	}
}
