
#include "UIScreens/MainMenu.txt"
#include "UIScreens/Store.txt"
#include "UIScreens/TreasureRoom.txt"
#include "UIScreens/Instructions.txt"
#include "UIScreens/Pause.txt"
#include "UIScreens/InputBox.txt"
#include "UIScreens/MessageBox.txt"
#include "UIScreens/SelectProfile.txt"
#include "UIScreens/ResumeOrContinue.txt"
#include "UIScreens/Difficulty.txt"
#include "UIScreens/Statistics.txt"
#include "UIScreens/Pyramid.txt"
#include "UIScreens/EndOfLevelStats.txt"
#include "UIScreens/StageTransition.txt"
#include "UIScreens/GameWon.txt"
#include "UIScreens/NewRank.txt"
#include "UIScreens/Story.txt"
#include "UIScreens/Huds.txt"
#include "UIScreens/ResolutionDropdown.txt"
#include "UIScreens/LevelIntro.txt"
#include "UIScreens/EndOfStageCanopicJars.txt"
#include "UIScreens/Credits.txt"
#include "UIScreens/GameOver.txt"
#include "UIScreens/GameLoading.txt"
#include "UIScreens/VerifyQuit.txt"
#include "UIScreens/IntroducePowerups.txt"
#include "UIScreens/IntroduceReflector.txt"
#include "UIScreens/NewUnlock.txt"



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

screen Playing
{
	onaction escape "pause"

}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

screen DoorTransition
{
	widget EffectEmitter OpenEffect
	{
		mins 0, 0

		effectName "Story_Door_Open_Hit_01"
		
		EventToStartEffectsOn "UIShowDoorOpenEffect"
	}

	widget Button LeftDoor1
	{
		mins -400, 0
		size 320, 600
		texture "data/gfx/StoryGates/left_edge"
	}

	widget Button LeftDoor2
	{
		mins -80, 0
		size 80, 600
		texture "data/gfx/StoryGates/left_edge_story_panel"
	}

	widget Button RightDoor1
	{
		mins 880, 0
		size 320, 600
		texture "data/gfx/StoryGates/right_edge"
	}

	widget Button RightDoor2
	{
		mins 800, 0
		size 80, 600
		texture "data/gfx/StoryGates/right_edge_story_panel"
	}
	
	widget EffectEmitter ClosedEffect
	{
		mins 0, 0

		effectName "Story_Door_Close_Hit_01"
		
		EventToStartEffectsOn "UIShowDoorClosedEffect"
	}
	
	widget EffectEmitter ClosingEffect
	{
		mins 0, 0

		effectName "Story_Door_Open_Moving_01"
		
		EventToStartEffectsOn "UIStartDoorClosingEffect"
		//EventToStopEffectsOn "UIStopDoorClosingEffect"
	}
	
	widget EffectEmitter OpeningEffect
	{
		mins 0, 0

		effectName "Story_Door_Open_Moving_01"
		
		EventToStartEffectsOn "UIStartDoorOpeningEffect"
		//EventToStopEffectsOn "UIStopDoorOpeningEffect"
	}
		
	
	animation In
	{
		init widget "LeftDoor1"			position=relative (0,0) 
		init widget "LeftDoor2"			position=relative (0,0)
		init widget "RightDoor1"		position=relative (0,0)
		init widget "RightDoor2"		position=relative (0,0)

		at 0 ms moveWidget "LeftDoor1"		from relative (0,0) to relative (400,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "LeftDoor2"		from relative (0,0) to relative (400,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor1"		from relative (0,0) to relative (-400,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor2"		from relative (0,0) to relative (-400,0) over 800 ms speed=Cosine
		at 0 ms consoleCommand 			"event PlaySound DoorTransitionClose"
		at 0 ms consoleCommand 			"event UIStartDoorClosingEffect"
		at 800 ms consoleCommand 		"event UIStopDoorClosingEffect"
		at 700 ms consoleCommand 		"event UIShowDoorClosedEffect"
		at 800 ms consoleCommand		"ClearScreenStackBelow DoorTransition"
		
		at 800 ms moveScreen			from relative (0,0) to relative (0,0) over 700 ms speed=Cosine // update this time with duration of the effect
	}

	animation Out
	{
		animHandoffTime 0

		init widget "LeftDoor1"			position=relative (400,0)
		init widget "LeftDoor2"			position=relative (400,0) 
		init widget "RightDoor1"		position=relative (-400,0) 
		init widget "RightDoor2"		position=relative (-400,0)

		at 0 ms moveWidget "LeftDoor1"		from relative (400,0)   to relative (0,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "LeftDoor2"		from relative (400,0)  to relative (0,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor1"		from relative (-400,0)  to relative (0,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor2"		from relative (-400,0) to relative (0,0) over 800 ms speed=Cosine
		at 0 ms consoleCommand 			"event PlaySound DoorTransitionOpen"
		at 0 ms consoleCommand 			"event UIShowDoorOpenEffect"
		at 0 ms consoleCommand 			"event UIStartDoorOpeningEffect"
		at 800 ms consoleCommand 		"event UIStopDoorOpeningEffect"
		
		at 800 ms moveWidget "LeftDoor1"		from relative (0,0)   to relative (0,0) over 1000 ms speed=Cosine // delay so the effect can go away
	}
}

screen DoorTransition_AdventureStage
{
	widget Button LeftDoor1
	{
		mins -400, 0
		size 320, 600
		texture "data/gfx/StoryGates/left_edge"
	}

	widget Label LeftDoor2
	{
		mins -80, 0
		size 80, 600
		
		EventToSetTextureFrom "SetStageTransitionLeftImage"
	}

	widget Button RightDoor1
	{
		mins 880, 0
		size 320, 600
		
		texture "data/gfx/StoryGates/right_edge"
	}

	widget Label RightDoor2
	{
		mins 800, 0
		size 80, 600
		
		EventToSetTextureFrom "SetStageTransitionRightImage"
	}
	
	widget EffectEmitter ClosedEffect
	{
		mins 0, 0

		effectName "Story_Door_Close_Hit_01"
		
		EventToStartEffectsOn "UIShowDoorAClosedEffect"
	}
	
	widget EffectEmitter ClosingEffect
	{
		mins 0, 0

		effectName "Story_Door_Open_Moving_01"
		
		EventToStartEffectsOn "UIStartDoorAClosingEffect"
		//EventToStopEffectsOn "UIStopDoorAClosingEffect"
	}
	
	widget EffectEmitter OpenEffect
	{
		mins 0, 0

		effectName "Story_Door_Open_Hit_01"
		
		EventToStartEffectsOn "UIShowDoorAOpenEffect"
	}
	
	widget EffectEmitter OpeningEffect
	{
		mins 0, 0

		effectName "Story_Door_Open_Moving_01"
		
		EventToStartEffectsOn "UIStartDoorAOpeningEffect"
		//EventToStopEffectsOn "UIStopDoorAOpeningEffect"
	}
		

	animation In
	{
		init widget "LeftDoor1"			position=relative (0,0) 
		init widget "LeftDoor2"			position=relative (0,0)
		init widget "RightDoor1"		position=relative (0,0)
		init widget "RightDoor2"		position=relative (0,0)

		at 0 ms moveWidget "LeftDoor1"		from relative (0,0) to relative (400,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "LeftDoor2"		from relative (0,0) to relative (400,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor1"		from relative (0,0) to relative (-400,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor2"		from relative (0,0) to relative (-400,0) over 800 ms speed=Cosine
		at 0 ms consoleCommand 			"event PlaySound DoorTransitionClose"
		at 0 ms consoleCommand 			"event UIStartDoorAClosingEffect"
		at 800 ms consoleCommand 		"event UIStopDoorAClosingEffect"
		at 700 ms consoleCommand 		"event UIShowDoorAClosedEffect"
		at 800 ms consoleCommand		"ClearScreenStackBelow DoorTransition_AdventureStage"
		
		at 800 ms moveScreen			from relative (0,0) to relative (0,0) over 700 ms speed=Cosine // update this time with duration of the effect
	}

	animation Out
	{
		animHandoffTime 0

		init widget "LeftDoor1"			position=relative (400,0)
		init widget "LeftDoor2"			position=relative (400,0) 
		init widget "RightDoor1"		position=relative (-400,0) 
		init widget "RightDoor2"		position=relative (-400,0)

		at 0 ms moveWidget "LeftDoor1"		from relative (400,0)   to relative (0,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "LeftDoor2"		from relative (400,0)  to relative (0,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor1"		from relative (-400,0)  to relative (0,0) over 800 ms speed=Cosine
		at 0 ms moveWidget "RightDoor2"		from relative (-400,0) to relative (0,0) over 800 ms speed=Cosine
		at 0 ms consoleCommand 			"event PlaySound DoorTransitionOpen"
		at 0 ms consoleCommand 			"event UIShowDoorAOpenEffect"
		at 0 ms consoleCommand 			"event UIStartDoorAOpeningEffect"
		at 800 ms consoleCommand 		"event UIStopDoorAOpeningEffect"
		
		at 800 ms moveWidget "LeftDoor1"		from relative (0,0)   to relative (0,0) over 1000 ms speed=Cosine // delay so the effect can go away
	}

}
