// sample animation script
//
//
// commands:
//	Animate <panel name> <variable> <target value> <interpolator> <start time> <duration>
//		variables:
//			FgColor
//			BgColor
//			Position
//			Size
//			Blur		(hud panels only)
//			TextColor	(hud panels only)
//			Ammo2Color	(hud panels only)
//			Alpha		(hud weapon selection only)
//			SelectionAlpha  (hud weapon selection only)
//			TextScan	(hud weapon selection only)
//
//		interpolator:
//			Linear
//			Accel - starts moving slow, ends fast
//			Deaccel - starts moving fast, ends slow
//			Spline - simple ease in/out curve
//			Pulse - < freq > over the duration, the value is pulsed (cosine) freq times ending at the dest value (assuming freq is integral)
//			Flicker - < randomness factor 0.0 to 1.0 > over duration, each frame if random # is less than factor, use end value, otherwise use prev value
//
//	RunEvent <event name> <start time>
//		starts another even running at the specified time
//
//	StopEvent <event name> <start time>
//		stops another event that is current running at the specified time
//
//	StopAnimation <panel name> <variable> <start time>
//		stops all animations refering to the specified variable in the specified panel
//
//	StopPanelAnimations <panel name> <start time>
//		stops all active animations operating on the specified panel
//
//  SetFont <panel name> <fontparameter> <fontname from scheme> <set time> 
//
//	SetTexture <panel name> <textureidname> <texturefilename> <set time>
//
//  SetString <panel name> <string varname> <stringvalue> <set time>


//Health Bonus Pulse
event HudHealthBonusPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"255"				Linear 0.0 0.0
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"					Linear 0.2 0.0
	
	
	Animate	PlayerStatusHealthValue			fgcolor		"100 200 255 255"	Linear 0.0 0.0

	RunEvent HudHealthBonusPulseLoop	0.4
}

// call to loop HudHealthBonusPulse
event HudHealthBonusPulseLoop
{
	RunEvent HudHealthBonusPulse 0.0
}

event HudHealthBonusPulseStop
{
	StopEvent HudHealthBonusPulse 0.0
	StopEvent HudHealthBonusPulseLoop 0.0
	Animate	PlayerStatusHealthValue			fgcolor		"White"		Linear 0.0 0.0
}

//===========================================

//Health Dying Pulse
event HudHealthDyingPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"255"		Linear 0.0 0.075
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"			Linear 0.125 0.075
	Animate	PlayerStatusHealthValue			fgcolor		"255 20 20 255"	Linear 0.0 0.0
	
	RunEvent HudHealthDyingPulseLoop	0.25
}

// call to loop HudHealthDyingPulse
event HudHealthDyingPulseLoop
{
	RunEvent HudHealthDyingPulse 0.0
}

event HudHealthDyingPulseStop
{
	StopEvent HudHealthDyingPulse 0.0
	StopEvent HudHealthDyingPulseLoop 0.0
	Animate	PlayerStatusHealthValue			fgcolor		"White"	Linear 0.0 0.0
}

//===========================================

event HudLowAmmoPulse
{
	Animate	HudWeaponLowAmmoImage		Alpha		"255"		Linear 0.0 0.075
	Animate	HudWeaponLowAmmoImage		Alpha		"0"			Linear 0.125 0.075
	Animate	AmmoInClip				fgcolor		"255 20 20 255"	Linear 0.0 0.0
	Animate	AmmoInReserve				fgcolor		"255 20 20 255"	Linear 0.0 0.0
	Animate	AmmoNoClip				fgcolor		"255 20 20 255"	Linear 0.0 0.0
	
	RunEvent HudLowAmmoPulseLoop	0.25
}

// call to loop HudLowAmmoPulse
event HudLowAmmoPulseLoop
{
	RunEvent HudLowAmmoPulse 0.0
}

event HudLowAmmoPulseStop
{
	StopEvent HudLowAmmoPulse 0.0
	StopEvent HudLowAmmoPulseLoop 0.0
	Animate		AmmoInClip	fgcolor		"White"	Linear 0.0 0.0
	Animate		AmmoInReserve	fgcolor		"White"	Linear 0.0 0.0
	Animate		AmmoNoClip	fgcolor		"White"	Linear 0.0 0.0
}

//===========================================

// Metal Account

//activecolor - instantly turn red, fade back to yellow
event AccountMoneyRemoved
{
	Animate HudAccount		FgColor	"HudIcon_Red" Linear 0.0 0.0001
	Animate HudAccount		FgColor	"OrangeDim" Accel 0.0 3.0

	Animate	HudAccount		Ammo2Color "HudIcon_Red" Linear 0.0 0.0001
	Animate HudAccount		Ammo2Color "0 0 0 0" Accel 0.0 3.0
}

//activecolor - instantly turn green, fade back to yellow
event AccountMoneyAdded
{
	Animate HudAccount		FgColor	"HudIcon_Green" Linear 0.0 0.0001
	Animate HudAccount		FgColor	"OrangeDim" Accel 0.0 3.0

	Animate HudAccount		Ammo2Color "HudIcon_Green" Accel 0.0 0.0001
	Animate HudAccount		Ammo2Color "0 0 0 0" Accel 0.0 3.0
}

event AccountMoneyInvisible
{
	Animate HudAccount		FgColor	"OrangeDim" Accel 0.0 0.0001
	Animate HudAccount		Ammo2Color "0 0 0 0" Accel 0.0 0.0001
}


// Spy Disguise
event HudSpyDisguiseChanged
{
	Animate PlayerStatusSpyOutlineImage		Alpha		"255"			Linear 0.0 0.2
	
	Animate PlayerStatusSpyOutlineImage		Position	"45 r210"		Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"100 100"		Linear 0.0 0.2

	RunEvent HudSpyDisguiseHide	0.7
}

event HudSpyDisguiseHide
{
	Animate PlayerStatusSpyOutlineImage		Position	"55 r148"			Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"55 55"			Linear 0.0 0.2
	
	Animate PlayerStatusSpyOutlineImage		Alpha		"0"				Linear 0.2 0.1
}

event HudSpyDisguiseFadeIn
{
	RunEvent HudSpyDisguiseChanged	0
	Animate PlayerStatusSpyImage			Alpha		"255"			Linear 0.9 0.1	
}

event HudSpyDisguiseFadeOut
{

	Animate PlayerStatusSpyImage			Alpha		"0"				Linear 0.9 0.1	
	RunEvent HudSpyDisguiseChanged	0
}

//===========================================

// Show the Overtime panel
event OvertimeShow
{
	Animate OvertimeLabel				Alpha		"255"			Linear 0.0 0.1	
	Animate OvertimeBG					Alpha		"255"			Linear 0.0 0.1	
}


event HudSnapShotReminderIn
{
	Animate ScreenshotPanel		Position	"-170 5"	Linear 0.0 0.001
	Animate ScreenshotPanel		Position	"0 5"	Spline 0.001 0.2
}

event HudReplayReminderIn	// Places the replay reminder in the same place as the snapshot reminder
{
	Animate ReplayReminder		Position	"-170 50"	Linear 0.0 0.001
	Animate ReplayReminder		Position	"0 50"	Spline 0.001 0.2
}

event HudReplayReminderIn2	// Puts the panel below the snapshot panel
{
	Animate ReplayReminder		Position	"-170 50"	Linear 0.0 0.001
	Animate ReplayReminder		Position	"0 50"	Spline 0.001 0.2
}

event HudReplayTipIn
{
	Animate ReplayTip			Position	"10 -100"	Linear 0.0 0.001
	Animate ReplayTip			Position	"10 6"		Spline 0.001 0.1
}

event HudReplayTipOut
{
	Animate ReplayTip			Position	"10 6"		Linear 0.0 0.001
	Animate ReplayTip			Position	"10 -100"	Spline 0.001 0.1
}

event HudTournamentSetupPanelOpen
{
	Animate HudTournamentSetupBackground	Position	"0 -90"	Linear 0.0 0.001
	Animate HudTournamentSetupBackground	Position	"0 0"	Spline 0.001 0.2
	
	Animate TournamentLabel	Position	"0 -90"	Linear 0.0 0.001
	Animate TournamentLabel	Position	"0 0"	Spline 0.001 0.2
	
	Animate TournamentLabelA	Position	"5 14"	Linear 0.0 0.001
	Animate TournamentLabelA	Position	"5 75"	Spline 0.001 0.2
	
	Animate TournamentTeamNameLabel	Position	"0 -85"	Linear 0.0 0.001
	Animate TournamentTeamNameLabel	Position	"0 15"	Spline 0.001 0.2
	
	Animate TournamentNameEdit	Position	"5 -85"	Linear 0.0 0.001
	Animate TournamentNameEdit	Position	"5 15"	Spline 0.001 0.2
	
	Animate TournamentNotReadyButton	Position	"130 -50"	Linear 0.0 0.001
	Animate TournamentNotReadyButton	Position	"130 40"	Spline 0.001 0.2
	
	Animate TournamentReadyButton	Position	"40 -50"	Linear 0.0 0.001
	Animate TournamentReadyButton	Position	"40 40"	Spline 0.001 0.2
}

event HudTournamentSetupPanelClose
{
	Animate HudTournamentSetupBackground	Position	"0 0"	Linear 0.0 0.001
	Animate HudTournamentSetupBackground	Position	"0 -90"	Spline 0.001 0.2
	
	Animate TournamentLabel	Position	"0 0"	Linear 0.0 0.001
	Animate TournamentLabel	Position	"0 -90"	Spline 0.001 0.2
	
	Animate TournamentLabelA	Position	"5 75"	Linear 0.0 0.001
	Animate TournamentLabelA	Position	"5 14"	Spline 0.001 0.2
	
	Animate TournamentTeamNameLabel	Position	"0 15"	Linear 0.0 0.001
	Animate TournamentTeamNameLabel	Position	"0 -85"	Spline 0.001 0.2
	
	Animate TournamentNameEdit	Position	"5 15"	Linear 0.0 0.001
	Animate TournamentNameEdit	Position	"5 -85"	Spline 0.001 0.2

	Animate TournamentNotReadyButton	Position	"130 40"	Linear 0.0 0.001
	Animate TournamentNotReadyButton	Position	"130 -50"	Spline 0.001 0.2
	
	Animate TournamentReadyButton	Position	"40 40"	Linear 0.0 0.001
	Animate TournamentReadyButton	Position	"40 -50"	Spline 0.001 0.2
}


//====================================

// Flash the medic charge hud when we have full charge

event HudMedicCharged
{
	Animate	ChargeLabel 	FgColor		"100 200 255 255"		Linear 0.2 0.5
	Animate	ChargeMeter 	FgColor		"100 200 255 255"		Linear 0.2 0.5

	RunEvent HudMedicChargedLoop	0.6
}

// call to loop HudHealthBonusPulse
event HudMedicChargedLoop
{
	RunEvent HudMedicCharged 0.0
}

event HudMedicChargedStop
{
	StopEvent HudMedicCharged 0.0
	StopEvent HudMedicChargedLoop 0.0
	
	Animate	ChargeLabel 	FgColor		"White"		Linear 0.0 0.0001
	Animate	ChargeMeter 	FgColor		"White"		Linear 0.0 0.0001
}

//====================================

event VideoCaptionFadeIn
{
	Animate VideoCaption	Alpha		"255"			Linear 0.0 0.1
}

event VideoCaptionFadeOut
{
	Animate VideoCaption	Alpha		"0"				Linear 0.0 0.1
}

//====================================

// arena

event ArenaVsPanelOnShow
{
	Animate bluepanel	Position	"-200 50"	Linear 0.0 0.001
	Animate redpanel	Position	"r-200 140"	Linear 0.0 0.001
	Animate vslabel	Alpha	"0"		Linear 0.0 0.001
		
	RunEvent ArenaVsPanelSlideIn	1.0
	RunEvent ArenaVsPanelSlideOut	4.8
}

event ArenaVsPanelSlideIn
{
	Animate bluepanel	Position	"c-100 50"	Spline 0.0 0.2
	Animate redpanel	Position	"c-100 140"	Spline 0.0 0.2
	Animate vslabel	Alpha	"255"	Linear 0.15 0.2
}

event ArenaVsPanelSlideOut
{
	Animate bluepanel	Position	"-200 50"	Spline 0.0 0.2	
	Animate redpanel	Position	"r-200 140"	Spline 0.0 0.2
	Animate vslabel	Alpha	"0"		Linear 0.0 0.05
}

//===========================================

// Active Timer BG Pulse
event ActiveTimerBGPulse
{
	Animate	ActiveTimerBG 	Alpha		"0"			Linear 0.1 0.1
	Animate	ActiveTimerBG 	Alpha		"255"		Linear 0.3 0.1
	
	Animate	ActiveTimerBG 	Alpha		"0"			Linear 0.5 0.1
	Animate	ActiveTimerBG 	Alpha		"255"		Linear 0.7 0.1
	
	Animate	ActiveTimerBG 	Alpha		"0"			Linear 0.9 0.1
	Animate	ActiveTimerBG 	Alpha		"255"		Linear 1.1 0.1
}

event ActiveTimerHighlight
{
	Animate TimePanelValue Alpha	"255"		Linear 0.0 0.4
	
}

event ActiveTimerDim
{
	// Slow fade out
	Animate TimePanelValue Alpha	"50"		Linear 0.0 0.4
}

//===========================================


event TrainingHudBounce
{
	Animate ObjectiveStatusTraining	Position		"-200 c-80"		Linear 0 0
	Animate ObjectiveStatusTraining	Position		"0 c-80"		Linear 0.0 0.5
}

event TrainingPressSpacebarBlink
{
	Animate	PressSpacebarToContinue 	Alpha		"255"		Linear 0.0 0.1
	Animate	PressSpacebarToContinue 	Alpha		"0"			Linear 0.2 0.1
		
	Animate	PressSpacebarToContinue 	Alpha		"255"		Linear 0.4 0.1
	Animate	PressSpacebarToContinue 	Alpha		"0"			Linear 0.6 0.1
	
	Animate	PressSpacebarToContinue 	Alpha		"255"		Linear 0.8 0.1
	Animate	PressSpacebarToContinue 	Alpha		"0"			Linear 1.0 0.1
	
	Animate	PressSpacebarToContinue 	Alpha		"255"		Linear 1.2 0.1

	RunEvent TrainingPressSpacebarBlinkLoop		3.0
}

event TrainingPressSpacebarBlinkLoop
{
	RunEvent TrainingPressSpacebarBlink			0.0
}

event TrainingPressSpacebarBlinkStop
{
	StopEvent TrainingPressSpacebarBlink			0.0
	StopEvent TrainingPressSpacebarBlinkLoop 		0.0
}

//===========================================

event IntroMovieContinueBlink
{
	Animate	continue 	Alpha		"255"		Linear 0.0 0.1
	Animate	continue 	Alpha		"0"			Linear 0.2 0.1
		
	Animate	continue 	Alpha		"255"		Linear 0.4 0.1
	Animate	continue 	Alpha		"0"			Linear 0.6 0.1
	
	Animate	continue 	Alpha		"255"		Linear 0.8 0.1
	Animate	continue 	Alpha		"0"			Linear 1.0 0.1
	
	Animate	continue 	Alpha		"255"		Linear 1.2 0.1

	RunEvent IntroMovieContinueBlinkLoop		2.0
}

event IntroMovieContinueBlinkLoop
{
	RunEvent IntroMovieContinueBlink			0.0
}

event IntroMovieContinueBlinkStop
{
	StopEvent IntroMovieContinueBlink			0.0
	StopEvent IntroMovieContinueBlinkLoop 		0.0
}

//===========================================

event HasMOTDBlink
{
	Animate	SubImage 	Alpha		"255"		Linear 0.0 0.1
	Animate	SubImage 	Alpha		"0"			Linear 0.2 0.1
		
	Animate	SubImage 	Alpha		"255"		Linear 0.4 0.1
	Animate	SubImage 	Alpha		"0"			Linear 0.6 0.1
	
	Animate	SubImage 	Alpha		"255"		Linear 0.8 0.1
	Animate	SubImage 	Alpha		"0"			Linear 1.0 0.1
	
	Animate	SubImage 	Alpha		"255"		Linear 1.2 0.1

	RunEvent HasMOTDBlinkLoop		2.0
}

event HasMOTDBlinkLoop
{
	RunEvent HasMOTDBlink			0.0
}

event HasMOTDBlinkStop
{
	StopEvent HasMOTDBlink				0.0
	StopEvent HasMOTDBlinkLoop 		0.0
	Animate	SubImage 	Alpha		"255"		Linear 0.0 0.1
}

//===========================================

event HasNotificationsBlink
{
	Animate	SubImage 	Alpha		"255"		Linear 0.0 0.1
	Animate	SubImage 	Alpha		"0"			Linear 0.2 0.1
		
	Animate	SubImage 	Alpha		"255"		Linear 0.4 0.1
	Animate	SubImage 	Alpha		"0"			Linear 0.6 0.1
	
	Animate	SubImage 	Alpha		"255"		Linear 0.8 0.1
	Animate	SubImage 	Alpha		"0"			Linear 1.0 0.1
	
	Animate	SubImage 	Alpha		"255"		Linear 1.2 0.1

	RunEvent HasNotificationsBlinkLoop		2.0
}

event HasNotificationsBlinkLoop
{
	RunEvent HasNotificationsBlink			0.0
}

event HasNotificationsBlinkStop
{
	StopEvent HasNotificationsBlink				0.0
	StopEvent HasNotificationsBlinkLoop 		0.0
	Animate	SubImage 	Alpha		"255"		Linear 0.0 0.1
}

//===========================================

event AddToCartBlink
{
	Animate	CartButton	BgColor	"TanDark"		Linear 0.0 0.01
	Animate	CartButton	BgColor	"255 150 0 255"	Linear 0.1 0.01
		
	Animate	CartButton 	BgColor	"TanDark"		Linear 0.2 0.01
	Animate	CartButton 	BgColor	"255 150 0 255"	Linear 0.3 0.01
	
	Animate	CartButton 	BgColor	"TanDark"		Linear 0.4 0.01
	Animate	CartButton 	BgColor	"255 150 0 255"	Linear 0.5 0.01
	
	Animate	CartButton	BgColor	"TanDark"		Linear 0.6 0.01
	Animate	CartButton	BgColor	"255 150 0 255"	Linear 0.7 0.01
		
	Animate	CartButton 	BgColor	"TanDark"		Linear 0.8 0.01
	Animate	CartButton 	BgColor	"255 150 0 255"	Linear 0.9 0.01
	
	Animate	CartButton 	BgColor	"TanDark"		Linear 1.0 0.01
}

//===========================================

event NotificationsPresentBlink
{
	Animate	NotificationsPresentPanel 	bgcolor		"IsaacDarkGray"		Linear 0.0 1.0
	Animate	NotificationsPresentPanel 	bgcolor		"IsaacMediumGray"			Linear 1.0 1.0
	
	Animate	NotificationsPresentPanel 	bgcolor		"IsaacDarkGray"		Linear 2.0 1.0

	RunEvent NotificationsPresentBlinkLoop		2.0
}

event NotificationsPresentBlinkLoop
{
	RunEvent NotificationsPresentBlink			0.0
}

event NotificationsPresentBlinkStop
{
	StopEvent NotificationsPresentBlink				0.0
	StopEvent NotificationsPresentBlinkLoop 		0.0
	Animate	NotificationsPresentPanel 	bgcolor		"IsaacDarkGray"		Linear 0.0 0.1
}

//===========================================

event SpyWarningFlash
{
	Animate	EnemyCountImageBG	BgColor	"RedSolid"		Linear 0.0 0.01
	Animate	EnemyCountImageBG	BgColor	"TanLight"		Linear 0.21 0.01
	
	RunEvent	SpyWarningFlashLoop		0.42
}

event SpyWarningFlashLoop
{
	RunEvent SpyWarningFlash			0.0
}
 
event SpyWarningFlashEnd
{
	StopEvent SpyWarningFlash			0.0
	StopEvent SpyWarningFlashLoop		0.0
}

event HudReadyPulse
{
	Animate	TournamentInstructionsLabel 	FgColor		"200 100 100 255"		Linear 0.0 0.3
}

event HudReadyPulseLoop
{
	RunEvent HudReadyPulse			0.0
}

event HudReadyPulseEnd
{
	Animate	TournamentInstructionsLabel 	FgColor		"150 200 150 255"		Linear 0.0 0.1
}

event HudTournament_MoveTimerDown
{
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 150 Linear 0 0

	SetVisible CountdownBG 0 5
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0

	Animate CountdownLabel ypos c-3 Gain 0.75 0 0.4
	Animate CountdownLabelShadow ypos c0 Gain 0.75 0 0.4

	SetVisible	TournamentConditionLabel 0 2

	SetVisible CountdownLabel 0 3
	SetVisible CountdownLabelShadow 0 3
}

//--------------------------------------------------------------------------
event HudTournament_AnimateTeams_In
{
	Animate RedTeamPanel xpos c150 Accel 0 0.25
	Animate BlueTeamPanel xpos c-300 Accel 0 0.25
}

event HudTournament_AnimateTeams_Out
{
	Animate RedTeamPanel xpos r-5 Accel 0 0.68
	Animate BlueTeamPanel xpos -155 Accel 0 0.68
}

event HudMatchStatus_ShowMatchStartDoors
{

	SetVisible	MatchDoors	1	0
	SetVisible	BlueTeamPanel	1	0
	SetVisible	RedTeamPanel	1	0
	SetVisible CountdownLabel 1 0
	SetFont CountdownLabel 1 HudFontMediumBold 0
	SetVisible CountdownLabelShadow 1 0
	SetVisible TournamentConditionBackground 0 0
	SetVisible TournamentConditionBlue 0 0
	SetVisible TournamentConditionRed 0 0

	Animate CountdownLabel ypos c-5 Gain 0.75 0 0.4
	Animate CountdownLabel alpha 255 Linear 0.0 0.0
	Animate CountdownLabelShadow ypos c-5 Gain 0.75 0 0.4

	SetVisible	MatchDoors	1	0
	SetVisible	BlueTeamPanel	1	0
	SetVisible	RedTeamPanel	1	0

	SetVisible	HudTournamentBG 0	2
	RunEventChild MatchDoors PlayDoorCloseAnim 0
	RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
	RunEventChild MatchDoors PlayDoorOpenAnim 8

	RunEvent HudTournament_AnimateTeams_In 0.25
	RunEvent HudTournament_AnimateTeams_Out 8.8

	SetVisible MatchDoors	0 11
	SetVisible CountdownLabel 0 9.9
	SetVisible CountdownLabelShadow 0 9.9

	RunEvent HudTournament_DoorsCleanup 10
	
	SetVisible CountdownBG 1 11
}


event HudMatchStatus_ShowCountdown
{
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 150 Linear 0 0
	Animate CountdownLabel ypos c-3 Gain 0.75 0 0.4
	Animate CountdownLabelShadow ypos c-0 Gain 0.75 0 0.4
	SetVisible CountdownLabel 0 9.9
	SetVisible CountdownLabelShadow 0 9.9
}

event HudTournament_DoorsCleanup
{
	SetVisible	MatchDoors	0	0
	SetVisible	BlueTeamPanel	0	0
	SetVisible	RedTeamPanel	0	0

	Animate RedTeamPanel xpos r-5 Accel 0 0
	Animate BlueTeamPanel xpos -155 Accel 0 0
}

event PlayDoorSlamParticles
{
	FireCommand 0 "start0"
}

event PlayDoorCloseAnim
{
	FireCommand 0 "animation close"
}

event PlayDoorOpenAnim
{
	FireCommand 0 "animation open"
}

event HudTournament_ShowTimerCompetitive
{
	Animate CountdownLabel ypos 46 Linear 0.0 0.0
	Animate CountdownLabel alpha 255 Linear 0.0 0.2
	Animate CountdownLabelShadow ypos 46 Linear 0 0

	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event HudTournament_ShowTimerDefault
{
	Animate CountdownLabel ypos r55 Linear 0 0
	Animate CountdownLabelShadow ypos r56 Linear 0 0

	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event HudTournament_HideTimer
{
	Animate CountdownLabel alpha 0 Linear 0.0 0.2
	SetVisible CountdownBG  0 0
	SetVisible CountdownLabel 0 0
	SetVisible CountdownLabelShadow 0 0
}

event HudTournament_ShowRoundSign
{
	SetVisible RoundSignModel 1 0
	RunEventChild RoundSignModel HudTournament_PlaySignAnim 0
	SetVisible RoundSignModel 0 6
}

event HudTournament_PlaySignAnim
{
	FireCommand 0 "animation intro"
	FireCommand 5 "animation outro"
}

event TeamStatus_PlayerDead
{
	SetVisible DeathPanel  1 0
	SetVisible SkullPanel  1 0
	SetVisible respawntime  1 0
	
	Animate DeathPanel ypos 19 Accel 0 0.2
	Animate SkullPanel ypos 8 Accel 0 0.2
	Animate respawntime ypos 19 Accel 0 0.2
}

event TeamStatus_PlayerAlive
{
	Animate DeathPanel ypos 0 Accel 0 0.2
	Animate respawntime ypos 0 Accel 0 0.2
	SetVisible DeathPanel  0 0.2
}

event HudMatchStatus_ShowMatchWinDoors
{
	SetVisible	MatchDoors	1	0
	SetVisible	FrontParticlePanel	1	0

	RunEventChild MatchDoors PlayDoorCloseAnim 0
	RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
	RunEventChild MatchDoors PlayDoorOpenAnim 4.5

	SetVisible MatchDoors	0 7
	SetVisible	FrontParticlePanel	0	7
}

event HudMatchStatus_ShowMatchWinDoors_NoOpen
{
	SetVisible	MatchDoors	1	0
	SetVisible	FrontParticlePanel	1	0

	RunEventChild MatchDoors PlayDoorCloseAnim 0
	RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
}

event HudMatchSummary_SlideInPanels
{
	Animate BlueTeamPanel xpos 0 Accel 0.25 0.25
	Animate RedTeamPanel xpos 0 Accel 0.25 0.25
}

event MMenu_PlayList_Expand
{
	Animate ItemsContainer			ypos 420 Spline 0 0.4
	Animate EventPromo				ypos 470 Spline 0 0.4
	Animate SafeMode				ypos 470 Spline 0 0.4
	Animate VRBGPanel				ypos 633 Spline 0 0.4
	Animate VRModeButton			ypos 639 Spline 0 0.4
	Animate ShowPromoCodesButton	ypos 639 Spline 0 0.4

	Animate PlayListContainer Tall 260	 Spline	0.0 0.40

	FireCommand 0 "soundentry Panel.SlideDown"
}

event MMenu_PlayList_Collapse
{
	Animate ItemsContainer			ypos 160 Spline 0 0.4
	Animate EventPromo				ypos 210 Spline 0 0.4
	Animate SafeMode				ypos 210 Spline 0 0.4
	Animate VRBGPanel				ypos 373 Spline	0 0.4
	Animate VRModeButton			ypos 379 Spline 0 0.4
	Animate ShowPromoCodesButton	ypos 379 Spline 0 0.4

	Animate PlayListContainer Tall 0 Spline 0 0.4

	FireCommand 0 "soundentry Panel.SlideUp"
}

event MMenu_PlayList_Collapse_Immediate
{
	Animate ItemsContainer			ypos 160 Spline 0 0
	Animate EventPromo				ypos 210 Spline 0 0
	Animate VRBGPanel				ypos 373 Spline	0 0
	Animate VRModeButton			ypos 379 Spline 0 0
	Animate ShowPromoCodesButton	ypos 379 Spline 0 0

	Animate PlayListContainer Tall 0 Spline 0 0
}

event MMenu_SafeMode_Blink
{
	Animate InfoImage	alpha 255 Linear	0.0 0.1 
	Animate InfoImage	alpha 0 Linear		0.1 0.1

	Animate InfoImage	alpha 255 Linear	0.2 0.1 
	Animate InfoImage	alpha 0 Linear		0.3 0.1

	Animate InfoImage	alpha 255 Linear		0.4 0.1

	RunEvent MMenu_SafeMode_Blink 1
}

event CasualCategory_Checkbox_Hide
{
	Animate Checkbutton xpos 0 Deaccel 0 0.2
	Animate Title		xpos 115 Deaccel 0 0.2

	//Animate Title		FgColor TanDark Deaccel 0 0.2
}

event CasualCategory_Checkbox_Show
{
	Animate Checkbutton xpos 0 Deaccel 0 0.2
	Animate Title		xpos 115 Deaccel 0 0.2

	//Animate Title		FgColor TanLight Deaccel 0 0.2
}

event CasualCategory_Selected
{
	Animate Shade BgColor "0 0 0 0" Deaccel 0 0.2
	Animate Title		FgColor White Deaccel 0 0.2
}

event CasualCategory_NotSelected
{
	Animate Shade BgColor "0 0 0 250" Deaccel 0 0.2
	Animate Title		FgColor TanDark Deaccel 0 0.2
}

event MMenu_UpdateButton_StartGlow
{
	SetVisible	ViewDetailsGlow	1	0
	Animate ViewDetailsGlow BgColor "238 103 17 255" Linear 0 0
	Animate ViewDetailsGlow Alpha 0   Linear 0.0 0.2
	Animate ViewDetailsGlow Alpha 255 Linear 0.2 0.2
	Animate ViewDetailsGlow Alpha 0	  Linear 0.4 0.2
	Animate ViewDetailsGlow Alpha 255 Linear 0.6 0.2
	Animate ViewDetailsGlow Alpha 0	  Linear 0.8 0.2
	Animate ViewDetailsGlow Alpha 255 Linear 1.0 0.2
	Animate ViewDetailsGlow BgColor "178 83 22 255" Linear 1.0 1.0

	SetVisible	ViewWarButtonGlow	1	0
	Animate ViewWarButtonGlow BgColor "238 103 17 255" Linear 0 0
	Animate ViewWarButtonGlow Alpha 0   Linear 0.0 0.2
	Animate ViewWarButtonGlow Alpha 255 Linear 0.2 0.2
	Animate ViewWarButtonGlow Alpha 0	  Linear 0.4 0.2
	Animate ViewWarButtonGlow Alpha 255 Linear 0.6 0.2
	Animate ViewWarButtonGlow Alpha 0	  Linear 0.8 0.2
	Animate ViewWarButtonGlow Alpha 255 Linear 1.0 0.2
	Animate ViewWarButtonGlow BgColor "178 83 22 255" Linear 1.0 1.0

	RunEvent MMenu_UpdateButton_SubtleGlow 5
}

event MMenu_UpdateButton_SubtleGlow
{
	Animate ViewDetailsGlow BgColor "238 103 17 255" Linear 0 0.2
	Animate ViewDetailsGlow BgColor "178 83 22 255" Linear 0.2 1.0

	Animate ViewWarButtonGlow BgColor "238 103 17 255" Linear 0 0.2
	Animate ViewWarButtonGlow BgColor "178 83 22 255" Linear 0.2 1.0

	RunEvent MMenu_UpdateButton_SubtleGlow 5
}

event HealthProgressBar_Selected
{
	Animate HealthProgressBar	Alpha 255 Deaccel 0 0.2
}

event HealthProgressBar_NotSelected
{
	Animate HealthProgressBar	Alpha 50 Deaccel 0 0.2
}

