-- comicwindow.lua
-- comicwindow.lua

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

MakeDialog
{


	Bitmap 
	{
		name = "CountryBG",
		x = 0,
		y = 0,		
	},
	
	SetStyle(BackgroundStyle),
	
	BlgBitmap
	{
		x = kCenter,
		y = kCenter,
		image = "common/screens/sanfrancisco",
		alpha = 0.8,
		delay = 15,
	},
	
	SetStyle(BoxStyle),
	
	BlgBitmap 
	{
		w = 710, h = 594,
		positionMatrix = { x = 50, y = 50 },
	
		name = "storyBG",
		image = "common/screens/story/story_box",
		x = kCenter,
		y = kCenter,
	},
	
	WndStoryActivity
	{
		x = 250,
		y = 181,
		bgm = "audio/music/music_popup_story.ogg",
		fit = false,
		w = 516,
		h = 613,
		
		name = "WndStoryActivity",
		scriptName = "level/end_game_story.lua",
		
		-- control positions
		LeftCharX = 120,
		LeftCharY = 270,
		RightCharX = 680,
		RightCharY = 270,

		-----------------------------------------------------
		-- Right character Image
		-----------------------------------------------------
		-- image is set through code
		-- variable RightChar
		
--~ 		SetStyle(StoryPortraitStyle),
--~ 		BlgBitmap
--~ 		{
--~ 			name = "RightImage",
--~ 			x = kCenter + (304),
--~ 			y = kCenter - (30),
--~ 			image = "common/screens/story/story_blank",
--~ 			delay = 15,
--~ 			--w = 166, h = 435,
--~ 		},
--~ 		
		-----------------------------------------------------
		-- Left character Image
		-----------------------------------------------------
		-- image is set through code
		-- variable LeftChar
--~ 		BlgBitmap
--~ 		{
--~ 			name = "LeftImage",
--~ 			x = kCenter - (280),
--~ 			y = kCenter - (30),
--~ 			image = "common/screens/story/story_blank",
--~ 			delay = 10,
--~ 			--w = 314, h = 490,
--~ 		},		
		
		-----------------------------------------------------
		-- Story Window title
		-----------------------------------------------------
		-- text is set through code
		-- variable TitleText
		
		SetStyle(StoryTitleStyle),
		
		BlgText
		{
			name = "TextTitle",
			x = kCenter ,
			y = kCenter - 155,
			w = 500, h = 150,
			flags = kHAlignCenter + kVAlignTop,
		},
		
		-----------------------------------------------------
		-- Story Window contents
		-----------------------------------------------------
		-- text and position is set through code
		-- variables ContentText, ContentX, ContentY
		SetStyle(StoryJadeStyle),		
		
		BlgText
		{
			name = "TextContent",
			x = 515,
			y = 385, 
			w = 375, h=0,
			--flags = kHAlignLeft + kVAlignTop,
			typewriter = true,
			typewriteEvery = 1,
			--typewriteSound = "audio/sfx/sfx_typing_01.ogg",
			typewriteDelay = 15,
			fps = 300,
		},	
			
		-- will be the parent of script generated widgets
		Window
		{
			name = "Dummy",
			w = width,
			h = height,
			x = kCenter,
			y = kCenter,
		}
	},	
	
	-----------------------------------------------------
	-- Navigation Buttons
	-----------------------------------------------------	
--~ 	
--~ 	SetStyle(BoxStyle),
--~ 	
--~ 	BlgButton
--~ 	{
--~ 		name= "btnContentText",
--~ 		--label= "story_btn_prevpage",
--~ 		graphics = {				
--~ 			"common/screens/comic/box_01",
--~ 			"",
--~ 			"",
--~ 			"",
--~ 		},
--~ 		width = 534, height = 99,
--~ 		w = 300, h = 200,
--~ 		x = 244, y = 565,
--~ 		command =
--~ 				function()
--~     				OnBtnPrevious();
--~ 				end
--~ 	},

	SetStyle(OrangeButtonStyle);
	-------------------------------------------------------------------
	-- make buttons buttons
	BlgButton
	{
		name= "btnFinish",
		label= "story_btn_skip",
		graphics = {				
			"common/screens/comic/skip",
			"",
			"",
			"",
		},
		labelMatrix = {x = 0, y = 1,},
		width = 300, height = 200,
		w = 300, h = 200,
		x = 450, y = 675,
		--close = true,
		command =
			        function()
					--PopSound();
			        	SwapToModalWithTransition("wndmainmenu.lua");
						DoModalWithTransition("wndcredits.lua");
			        end
		,
	},
	
	SetStyle(GreenButtonStyle);
	
	BlgButton 
	{
		name= "btnNext",
		label= "story_btn_nextpage",
		graphics = {				
			"common/screens/comic/botonnext_01",
			"",
			"",
			"",
		},
		labelMatrix = {x = 0, y = 1,},
		width = 300, height = 200,
		w = 300, h = 200,
		x = 450 + 155, y = 675,
		command =
				function()
    				OnBtnNext();
				end
	},
	
	BlgButton
	{
		name= "btnPrevious",
		enableVisibility=false,
		label= "story_btn_prevpage",
		graphics = {				
			"common/screens/comic/botonback_01",
			"",
			"",
			"",
		},
		labelMatrix = {x = 0, y = 1,},
		width = 300, height = 200,
		w = 300, h = 200,
		x = 450 - 150, y = 675,
		command =
				function()
    				OnBtnPrevious();
				end
	},
	
}
