screen EndOfLevelBonus
{
	onaction escape "event EscapeBonus"

	widget Button Frame
	{
		mins 80,10
		size 640,640

		texture "data/gfx/ui/story/story_background.png"
	}

	widget EffectEmitter lightning_orb
	{
		mins 400, 83
	
		effectName "HUD_lightning_orb_big_01"
		StartOn
	}
	
	widget Label LevelName
	{
		EventToPopulateFrom "UIDisplayLevelName"
		
		mins 80, 125
		size 640, 30
		
		text "Bonus Level"

		textAlignment "center"
		textVerticalAlignment "center"
		style "BannerTextBonus"
	}

	widget Label StageNumber
	{
		EventToPopulateFrom "UIDisplayStage"
		
		mins 80, 150
		size 640, 30
		
		text "Stage 3-7"

		textAlignment "center"
		textVerticalAlignment "center"
		style "RankText"
	}

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

	widget Label TreasuresDesc
	{
		mins 170, 180
		size 210, 30
		
		text "#TreasuresCollected"

		textAlignment "left"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

	widget Label TreasuresTotal
	{
		EventToPopulateFrom "UISetTreasuresValue"
	
		mins 450, 180
		size 70, 30

		textAlignment "left"
		textVerticalAlignment "center"
		style "EOLGreenText"
		
		hidden
	}
	

	widget Label TreasurePoints
	{
		EventToPopulateFrom "UISetTreasuresScore"
	
		mins 520, 180
		size 110, 30
		
		textAlignment "right"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

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

	widget Label AccuracyDesc
	{
		mins 170, 200
		size 210, 30
		
		text "#AccuracyBonus"

		textAlignment "left"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

	widget Label AccuracyValue
	{
		EventToPopulateFrom "UISetAccuracyValue"
	
		mins 380, 200
		size 50, 30
		
		textAlignment "right"
		textVerticalAlignment "center"
		style "EOLGreenText"
		
		hidden
	}
	
	widget Label PointsPerAccuracyPercent
	{
		EventToPopulateFrom "UISetAccuracyPointsPer"
	
		mins 430, 200
		size 90, 30
		
		textAlignment "left"
		textVerticalAlignment "center"
		style "EOLGreenText"
		
		hidden
	}	
	widget Label AccuracyPoints
	{
		EventToPopulateFrom "UISetAccuracyScore"
	
		mins 520, 200
		size 110, 30

		textAlignment "right"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

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

	widget Label ComboDesc
	{
		mins 170, 220
		size 210, 30
		
		text "#MaxComboBonus"

		textAlignment "left"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

	widget Label ComboTotal
	{
		EventToPopulateFrom "UISetCombosValue"
	
		mins 380, 220
		size 50, 30
		
		textAlignment "right"
		textVerticalAlignment "center"
		style "EOLGreenText"
		
		hidden
	}
	
	widget Label PointsPerCombo
	{
		EventToPopulateFrom "UISetCombosPointsPer"

		mins 430, 220
		size 90, 30

		textAlignment "left"
		textVerticalAlignment "center"
		style "EOLGreenText"
		
		hidden
	}

	widget Label ComboPoints
	{
		EventToPopulateFrom "UISetCombosScore"

		mins 520, 220
		size 110, 30
		
		textAlignment "right"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

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

	widget Label BallsDestroyedDesc
	{
		mins 170, 240
		size 210, 30
		
		text "#SpheresDestroyed"

		textAlignment "left"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

	widget Label BallsDestroyedTotal
	{
		EventToPopulateFrom "UISetBallsValue"

		mins 450, 240
		size 70, 30
		
		textAlignment "left"
		textVerticalAlignment "center"
		style "EOLGreenText"
		
		hidden
	}

	widget Label BallsDestroyedPoints
	{
		EventToPopulateFrom "UISetBallsScore"

		mins 520, 240
		size 110, 30
		
		textAlignment "right"
		textVerticalAlignment "center"
		style "Gold24Text"
		
		hidden
	}

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

	widget Label LevelTotalDesc
	{
		mins 260, 270
		size 170, 30
		
		text "#LevelScore"

		textAlignment "left"
		textVerticalAlignment "center"
		style "Gold28Text"
		
		hidden
	}

	widget Label LevelTotalPoints
	{
		EventToPopulateFrom "UISetLevelScore"

		mins 430, 270
		size 110, 30
		
		textAlignment "right"
		textVerticalAlignment "center"
		style "Gold28Text"
		
		hidden
	}

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

	widget Label TotalScore
	{
		EventToPopulateFrom "UISetTotalScore"

		mins 220, 305
		size 360, 30
		
		textAlignment "center"
		textVerticalAlignment "center"
		style "DarkGold28Text"
		
		hidden
	}
	
	widget Label TotalCoins
	{
		EventToPopulateFrom "UISetTotalCoins"

		mins 220, 330
		size 360, 30

		textAlignment "center"
		textVerticalAlignment "center"
		style "DarkGold28Text"
		
		hidden
	}
	

	///////////////////////////////////////////////////////////////////////////////
	
	widget Button GoToMainMenu
	{
		onaction enter "endgame"
	
		mins 224, 525
		size 115, 26
		
		text "#Menu"
        textAlignment "center"
		textVerticalAlignment "center"
		
		style "Luxor2Style03"
	}

	widget Button GoToStore
	{
		onaction enter "event RequestingStoreFromEndOfLevelBreakdown; SetScreenInAnim Store In; GotoScreenNoOuts Store DoorTransition"
	
		mins 336, 468
		size 128, 26	
		
		text "#Store"
        textAlignment "center"
		textVerticalAlignment "center"
		
		style "Luxor2Style03"
	}
	
	widget Button Continue
	{
		onaction enter "nextlevel"
	
		mins 452, 525
		size 115, 26
		
		text "#Continue"
        textAlignment "center"
		textVerticalAlignment "center"
		
		style "Luxor2Style03"
		
		EventToExecuteActionOn "EscapeBonus"
	}
	
	widget Button ShowNewUnlock
	{
		disabled
		
		onaction enter "pushdialog NewUnlock; event UIHideNewItemsUnlocked"
		
		eventToenableOn "UIShowNewItemsUnlocked"
		eventToDisableOn "UIHideNewItemsUnlocked"

		mins -1, -1
		size 1, 1
		text ""

		EventToExecuteActionOn "DisplayNewUnlockDialog" 
	}

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

	animation In
	{
		animHandoffTime 0
		
		init widget "TreasuresDesc" hide
		init widget "TreasuresTotal" hide
		init widget "TreasurePoints" hide
		init widget "AccuracyDesc" hide
		init widget "AccuracyValue" hide
		init widget "PointsPerAccuracyPercent" hide
		init widget "AccuracyPoints" hide
		init widget "BallsDestroyedDesc" hide
		init widget "BallsDestroyedTotal" hide
		init widget "BallsDestroyedPoints" hide
		init widget "LevelTotalDesc" hide
		init widget "LevelTotalPoints" hide
		init widget "TotalScore" hide
		init widget "TotalCoins" hide
		init widget "ComboPoints" hide
		init widget "PointsPerCombo" hide
		init widget "ComboTotal" hide
		init widget "ComboDesc" hide
		
		init screen					color=( 255,255,255,0 )
		
		at 0 ms colorScreen			from ( 255,255,255,0 ) to ( 255,255,255,255 ) over 300 ms speed=Cosine
			
		at 500 ms consoleCommand "event PlaySound CollideSpheresShotHit"
		at 600 ms consoleCommand "event PlaySound CollideSpheresShotHit"
		at 700 ms consoleCommand "event PlaySound CollideSpheresShotHit"
		at 800 ms consoleCommand "event PlaySound CollideSpheresShotHit"

		at 900 ms consoleCommand "event PlaySound CollideSpheresShotHit"
		at 900 ms consoleCommand "event TallyLevelScore"

		at 900 ms consoleCommand "event PlaySound CatchCoin"
		at 950 ms consoleCommand "event PlaySound CatchCoin"
		at 1000 ms consoleCommand "event PlaySound CatchCoin"
		at 1050 ms consoleCommand "event PlaySound CatchCoin"
		at 1100 ms consoleCommand "event PlaySound CatchCoin"
		at 1150 ms consoleCommand "event PlaySound CatchCoin"
		at 1200 ms consoleCommand "event PlaySound CatchCoin"
		at 1250 ms consoleCommand "event PlaySound CatchCoin"

		at 1400 ms consoleCommand "event PlaySound CollideSpheresShotHit"
		at 1400 ms consoleCommand "event TallyTotalScore"

		at 1400 ms consoleCommand "event PlaySound CatchCoin"
		at 1450 ms consoleCommand "event PlaySound CatchCoin"
		at 1500 ms consoleCommand "event PlaySound CatchCoin"
		at 1550 ms consoleCommand "event PlaySound CatchCoin"
		at 1600 ms consoleCommand "event PlaySound CatchCoin"
		at 1650 ms consoleCommand "event PlaySound CatchCoin"
		at 1700 ms consoleCommand "event PlaySound CatchCoin"
		at 1750 ms consoleCommand "event PlaySound CatchCoin"
		
		at 1900 ms consoleCommand "event PlaySound CollideSpheresShotHit"

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

		at 500 ms showWidget "TreasuresDesc"
		at 500 ms showWidget "TreasuresTotal"
		at 500 ms showWidget "TreasurePoints"

		at 600 ms showWidget "AccuracyDesc"
		at 600 ms showWidget "AccuracyValue"
		at 600 ms showWidget "PointsPerAccuracyPercent"
		at 600 ms showWidget "AccuracyPoints"
		
		at 700 ms showWidget "ComboDesc"
		at 700 ms showWidget "ComboTotal"
		at 700 ms showWidget "PointsPerCombo"
		at 700 ms showWidget "ComboPoints"

		at 800 ms showWidget "BallsDestroyedDesc"
		at 800 ms showWidget "BallsDestroyedTotal"
		at 800 ms showWidget "BallsDestroyedPoints"
		
		at 900 ms showWidget "LevelTotalDesc"
		at 900 ms showWidget "LevelTotalPoints"
		
		at 1400 ms showWidget "TotalScore"
		
		at 1900 ms showWidget "TotalCoins"
		
		at 2400 ms consoleCommand "event DisplayNewUnlockDialog"
	}
	
	animation Out
	{
		init screen					color=( 255,255,255,255 )
		at 0 ms colorScreen			from ( 255,255,255,255 ) to ( 255,255,255,0 ) over 300 ms speed=Cosine
	}
}