//
//	KrahHUD animations
//


event HudHealthBonusPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"205"		        Linear 0.0 0.2
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"			Linear 0.2 0.4

	Animate	PlayerStatusHealthValue 	FgColor		 "49 140 231 255"	        Accel 0.0 0.0
	
	RunEvent HudHealthBonusPulseLoop	0.4
}

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

event HudHealthBonusPulseStop
{
	StopEvent HudHealthBonusPulse 0.0
	StopEvent HudHealthBonusPulseLoop 0.0
	StopEvent PlayerStatusHealthValue 0.0
      
	

	Animate PlayerStatusHealthValue 	FgColor		"234 234 234 255"		Accel 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 10 10 255"	        Accel 0.0 0.0
	
	RunEvent HudHealthDyingPulseLoop	0.25
}

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

event HudHealthDyingPulseStop
{
	StopEvent HudHealthDyingPulse 0.0
	StopEvent HudHealthDyingPulseLoop 0.0
	StopEvent PlayerStatusHealthValue 0.0


	Animate	PlayerStatusHealthValue 	FgColor		"234 234 234 255"	        Accel 0.0 0.0
	
}

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

event HudLowAmmoPulse
{
	animate AmmoInReserve fGColor "170 10 10 255" linear 0.0 0.0
	animate AmmoNoClip fGColor "170 10 10 255" linear 0.0 0.0
	runEvent HudLowAmmoPulseLoop  0.1
}

event HudLowAmmoPulseLoop
{
	runEvent HudLowAmmoPulse 0.0
}

event HudLowAmmoPulseStop
{
	stopEvent HudLowAmmoPulse 0.0
	stopEvent HudLowAmmoPulseLoop 0.0
	animate AmmoInReserve fGColor KrahGreen linear 0.0 0.0
	animate AmmoNoClip fGColor KrahWhite linear 0.0 0.0
}

// default version:
//event HudLowAmmoPulse
//{
//	Animate	HudWeaponLowAmmoImage		Alpha		"255"		Linear 0.0 0.075
//	Animate	HudWeaponLowAmmoImage		Alpha		"0"			Linear 0.125 0.075
//	
//	RunEvent HudLowAmmoPulseLoop	0.25
//}
//
//event HudLowAmmoPulseStop
//{
//	StopEvent HudLowAmmoPulse 0.0
//	StopEvent HudLowAmmoPulseLoop 0.0
//}

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

event HudSnapShotReminderIn
{
	Animate ScreenshotPanel		Position	"c-83 -50"	Linear 0.0 0.001
	Animate ScreenshotPanel		Position	"c-83 -50"	Spline 0.001 0.2
	
	// Fix for lingering HUD animations
	RunEvent HudHealthDyingPulseStop 10.0
    RunEvent HudHealthBonusPulseStop 10.0
    RunEvent HudLowAmmoPulseStop 10.0
    RunEvent HudMedicChargedStop 10.0
}

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

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

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

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

event HudTournamentSetupPanelOpen
{
	Animate HudTournamentSetup	Position	"c-90 -70"	Linear 0.0 0.001
	Animate HudTournamentSetup	Position	"c-90 80"	Spline 0.001 0.2
}

event HudTournamentSetupPanelClose
{
	Animate HudTournamentSetup	Position	"c-90 80"	Linear 0.0 0.001
	Animate HudTournamentSetup	Position	"c-90 -70"	Spline 0.001 0.2
}

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

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

event UberchargeBg
{
	Animate	UberchargeBg	bgcolor		"KrahWhite"						Linear 0.0 0.3
	Animate	UberchargeBg	bgcolor		"G_CenteredUberchargeBg"		Linear 1.0 0.3
	Animate	UberchargeReady	Alpha		"255"			Linear 0.0 0.2
	Animate	UberchargeReady	FgColor		"KrahWhite"		Linear 0.2 0.2
	Animate	UberchargeReady	FgColor		"KrahWhite"		Linear 0.5 0.2
	Animate	UberchargeReady	Alpha		"0"				Linear 0.7 0.2
}

event HudMedicChargedBlink
{
	Animate	ChargeMeter 			FgColor		"KrahWhite"		Linear 0.0 0.45
	Animate	ChargeMeter1 			FgColor		"KrahWhite"		Linear 0.0 0.2
	Animate	ChargeMeter2 			FgColor		"KrahWhite"		Linear 0.1 0.2
	Animate	ChargeMeter3 			FgColor		"KrahWhite"		Linear 0.2 0.2
	Animate	ChargeMeter4 			FgColor		"KrahWhite"		Linear 0.3 0.2
	Animate	ChargeMeter 			FgColor		"KrahWhite"		Linear 0.45 0.45
	Animate	ChargeMeter1 			FgColor		"KrahWhite"		Linear 0.4 0.2
	Animate	ChargeMeter2 			FgColor		"KrahWhite"		Linear 0.5 0.2
	Animate	ChargeMeter3 			FgColor		"KrahWhite"		Linear 0.6 0.2
	Animate	ChargeMeter4 			FgColor		"KrahWhite"		Linear 0.7 0.2
	RunEvent HudMedicChargedLoop	0.9
}

event HudMedicCharged
{
	Animate	ChargeLabel 		FgColor		"KrahPink"			Linear 0.0 0.3
	Animate	ChargeLabel 		FgColor		"KrahCyan"		Linear 0.3 0.3
	Animate	ChargeLabel 		FgColor		"KrahGreen"		Linear 0.6 0.3

	Animate	ChargeMeter 		FgColor		"KrahPink"			Linear 0.0 0.3
	Animate	ChargeMeter 		FgColor		"KrahCyan"		Linear 0.3 0.3
	Animate	ChargeMeter 		FgColor		"KrahGreen"		Linear 0.6 0.3

	RunEvent HudMedicChargedLoop	0.9
}

event HudMedicChargedLoop
{
	RunEvent HudMedicCharged 0.0
}

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

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

event ActiveTimerHighlight
{
	Animate TimePanelValue FgColor	"KrahWhite"		Linear 0.1 0.1
	Animate TimePanelValue FgColor	"255 255 255 100"		Linear 0.3 0.1
	Animate TimePanelValue FgColor	"KrahWhite"		Linear 0.5 0.1
	Animate TimePanelValue FgColor	"255 255 255 100"		Linear 0.7 0.1
	Animate TimePanelValue FgColor	"KrahWhite"		Linear 0.9 0.1
	Animate TimePanelValue FgColor	"255 255 255 100"		Linear 1.1 0.1
	Animate TimePanelValue FgColor	"KrahWhite"		Linear 1.3 0.3
	
}

event ActiveTimerDim
{
	// Slow fade out
	Animate TimePanelValue FgColor	"255 255 255 100"		Linear 0.0 0.4
}

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

event HasMOTDBlink
{
	Animate	MOTD_ShowButtonPanel_SB 	Ypos		"-1"		Linear 0.0 0.05
	Animate	MOTD_ShowButtonPanel_SB 	Ypos		"0"			Linear 0.05 0.1
		
	Animate	MOTD_ShowButtonPanel_SB 	Ypos		"-1"		Linear 0.4 0.45
	Animate	MOTD_ShowButtonPanel_SB 	Ypos		"0"			Linear 0.45 0.5
	
	Animate	MOTD_ShowButtonPanel_SB 	Ypos		"-1"		Linear 0.8 0.85
	Animate	MOTD_ShowButtonPanel_SB 	Ypos		"0"			Linear 0.85 0.9

	RunEvent HasMOTDBlinkLoop		2.0
}

event HasMOTDBlinkLoop
{
	RunEvent HasMOTDBlink			0.0
}

event HasMOTDBlinkStop
{
	StopEvent HasMOTDBlink				0.0
	StopEvent HasMOTDBlinkLoop 			0.0
	Animate	MOTD_ShowButtonPanel_SB 	Ypos	"0"		Linear 0.0 0.05
}

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

event HasNotificationsBlink
{
	Animate	Notifications_ShowButtonPanel_SB 	Ypos	"0"		Linear 0.0 0.3
	Animate	Notifications_CountLabel 			Xpos	"0"		Linear 0.3 0.2
	Animate	Notifications_CountLabel 			Alpha	"255"	Linear 0.3 0.2
}

event HasNotificationsBlinkStop
{
	StopEvent HasNotificationsBlink				0.0
	StopEvent HasNotificationsBlinkLoop 		0.0
	Animate	Notifications_CountLabel 			Xpos		"16"	Linear 0.0 0.0
	Animate	Notifications_CountLabel 			Alpha		"0"		Linear 0.0 0.0
	Animate	Notifications_ShowButtonPanel_SB 	Ypos		"-26"	Linear 0.0 0.0
}

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

event DamagedPlayer
{
	StopEvent 	HitMarker 	0.0
	RunEvent 	HitMarker	0.01
}

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

event HudReadyPulse
{	
	Animate	TournamentInstructionsLabel 		Alpha		"255"				Linear 0.0 0.1
	Animate	TournamentInstructionsLabelShadow 	Alpha		"255"				Linear 0.0 0.1
	Animate	TournamentInstructionsLabel 	FgColor		"KrahWhite"		Linear 0.0 0.1
	Animate	TournamentInstructionsLabel 	FgColor		"RedSolid"		Linear 0.3 0.4
	RunEvent HudReadyPulseLoop	0.5
}

event HudReadyPulseEnd
{
	Animate	TournamentInstructionsLabel 		FgColor		"KrahWhite"		Linear 0.0 0.1
	Animate	TournamentInstructionsLabel 		Alpha		"0"				Linear 0.0 0.1
	Animate	TournamentInstructionsLabelShadow 	Alpha		"0"				Linear 0.0 0.1
	StopEvent HudReadyPulse			0.0
	StopEvent HudReadyPulseLoop		0.0
}


// Robot Destruction

event RDPositiveScorePulse
{
	Animate Score FgColor	"25 255 25 255"		Linear 0.0 0.0
	Animate Score FgColor	"KrahWhite"			Linear 0.1 0.2
	Animate Score Ypos	"8"		Deaccel 0.0 0.05
	Animate Score Ypos	"10"	Accel 0.05 0.2
	Animate ScoreShadow FgColor	"KrahDarkGray"		Deaccel 0.0 0.05
	Animate ScoreShadow FgColor	"KrahDarkGray"		Accel 0.1 0.2
}

event RDNegativeScorePulse
{
	Animate Score FgColor	"255 75 75 255"		Linear 0.0 0.0
	Animate Score FgColor	"KrahWhite"			Linear 0.1 0.2
	Animate Score Ypos	"8"		Deaccel 0.0 0.05
	Animate Score Ypos	"10"	Accel 0.05 0.2
	Animate ScoreShadow FgColor	"KrahDarkGray"		Deaccel 0.0 0.05
	Animate ScoreShadow FgColor	"KrahDarkGray"		Accel 0.1 0.2
}

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

// Do not move chat window
event CompetitiveGame_LowerChatWindow { }
event CompetitiveGame_RestoreChatWindow { }
event HudTournament_MoveChatWindow { }

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


event HudTournament_ShowTimerCompetitive
{
	Animate CountdownLabel ypos 90 Linear 0 0
	Animate CountdownLabelShadow ypos 91 Linear 0 0
	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event HudTournament_ShowTimerDefault
{
	Animate CountdownLabel ypos 123 Linear 0 0
	Animate CountdownLabelShadow ypos 124 Linear 0 0
	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}










