require( "scripts/style.lua" );

SetState( kPause, false );

gMaxScreen=6;
gCurScreen = 0;

function SetScreen( screen )

	for i=1,gMaxScreen do
		EnableWindow("TutorialText"..i,false);
	end
	EnableWindow("TutorialText"..screen,true);
	gCurScreen = screen ;
end

TextStyle=
{
	parent=DialogBodyText,
	x=0,y=46,w=kMax,h=kMax-80
};

DialogHeaderFont = {
  standardFont,
  20,
  WhiteColor
};

DialogHeaderStyle=
{
	parent=DefaultStyle,
	font = DialogHeaderFont,
	flags = kVAlignCenter + kHAlignCenter,
	x=kCenter-3,y=5,w=kMax,h=30
};

MakeDialog
{
	-- Name the modal dialog
	name="Tutorial",
	Bitmap
	{
		image="backgrounds/cleo_window_normal1",
		x=kCenter,
		y=kCenter,

		SetStyle(CloseButtonStyle);
		Button
		{
			x=kCenter+153,y=13,
			name="closebutton",
			command = function() CloseWindow("quittutorial"); end;
		};

		Window
		{
			name="TutorialText1",
			w=kMax,h=kMax,

			SetStyle(DialogHeaderStyle),
			Text
			{
				label="Tutorial1a",
			},

			SetStyle(TextStyle),
			Text
			{
				label="Tutorial1",
			},

			SetStyle(ScaledButtonStyle),
			Button
			{
				label="close",
				name="close",
				cancel=true,
				align=kHAlignCenter+kVAlignBottom,
				x=kCenter,
				y=kMax-80,
			command = function() CloseWindow("quittutorial"); end;
			},
		},
		Window
		{
			name="TutorialText2",
			w=kMax,h=kMax,

			SetStyle(DialogHeaderStyle),
			Text
			{
				label="Tutorial2a",
			},

			SetStyle(TextStyle),
			Text
			{
				label="Tutorial2",
			},
			SetStyle(ScaledButtonStyle),
			Button
			{
				label="close",
				name="close",
				cancel=true,
				align=kHAlignCenter+kVAlignBottom,
				x=kCenter,
				y=kMax-80,
			command = function() CloseWindow("quittutorial"); end;
			},
		},
		Window
		{
			name="TutorialText3",
			w=kMax,h=kMax,

			SetStyle(DialogHeaderStyle),
			Text
			{
				label="Tutorial3a",
			},

			SetStyle(TextStyle),
			Text
			{
				label="Tutorial3",
			},

			SetStyle(ScaledButtonStyle),
			Button
			{
				label="close",
				name="close",
				cancel=true,
				align=kHAlignCenter+kVAlignBottom,
				x=kCenter,
				y=kMax-80,
			command = function() CloseWindow("quittutorial"); end;
			},
		},
		Window
		{
			name="TutorialText4",
			w=kMax,h=kMax,

			SetStyle(DialogHeaderStyle),
			Text
			{
				label="Tutorial4a",
			},

			SetStyle(TextStyle),
			Text
			{
				label="Tutorial4",
			},
			SetStyle(ScaledButtonStyle),
			Button
			{
				label="close",
				name="close",
				cancel=true,
				align=kHAlignCenter+kVAlignBottom,
				x=kCenter,
				y=kMax-80,
			command = function() CloseWindow("quittutorial"); end;
			},
		},
		Window
		{
			name="TutorialText5",
			w=kMax,h=kMax,

			SetStyle(DialogHeaderStyle),
			Text
			{
				label="Tutorial5a",
			},

			SetStyle(TextStyle),
			Text
			{
				label="Tutorial5",
			},
			SetStyle(ScaledButtonStyle),
			Button
			{
				label="close",
				name="close",
				cancel=true,
				align=kHAlignCenter+kVAlignBottom,
				x=kCenter,
				y=kMax-80,
			command = function() CloseWindow("quittutorial"); end;
			},
		},
		Window
		{
			name="TutorialText6",
			w=kMax,h=kMax,

			SetStyle(DialogHeaderStyle),
			Text
			{
				label="Tutorial6a",
			},

			SetStyle(TextStyle),
			Text
			{
				label="Tutorial6",
			},
			SetStyle(ScaledButtonStyle),
			Button
			{
				label="close",
				name="close",
				cancel=true,
				align=kHAlignCenter+kVAlignBottom,
				x=kCenter,
				y=kMax-80,
			command = function() CloseWindow("quittutorial"); end;
			},
		}
	}
}

SetScreen(1);
