// 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
//
//	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
//
//
// Useful game console commands:
//	cl_Animationinfo <hudelement name> or <panelname> 
//		displays all the animatable variables for the hud element
//


event HintMessageShow
{
	// show the hints
	Animate HudHintDisplay Alpha	255 Linear 0.0 0.5

	// flash text
	Animate HudHintDisplay FgColor	"FgColor" 	Linear 0.0 0.01
	Animate HudHintDisplay FgColor	"255 220 0 255" Linear 0.5 0.2
	Animate HudHintDisplay FgColor	"FgColor" 	Linear 0.7 0.2
	Animate HudHintDisplay FgColor	"255 220 0 255" Linear 1.5 0.2
	Animate HudHintDisplay FgColor	"FgColor" 	Linear 1.7 0.2

	// hide the panel after a while	
	Animate HudHintDisplay Alpha	0 Linear 12.0 1.0
}

event HintMessageHide
{
	Animate HudHintDisplay Alpha	0 Linear 0.0 0.5
}


event OpenWeaponSelectionMenu
{
	StopEvent CloseWeaponSelectionMenu	0.0
	StopEvent WeaponPickup				0.0
	StopEvent FadeOutWeaponSelectionMenu	0.0

	// make the display visible
	Animate HudWeaponSelection Alpha 		"128"		Linear 0.0 0.1
	Animate HudWeaponSelection SelectionAlpha 	"255"		Linear 0.0 0.1
	Animate HudWeaponSelection FgColor		"FgColor"	Linear 0.0 0.1
	Animate HudWeaponSelection TextColor		"BrightFg"	Linear 0.0 0.1
	Animate HudWeaponSelection TextScan		"1" 		Linear 0.0 0.1
}

event CloseWeaponSelectionMenu
{
	// hide the whole thing near immediately
	Animate HudWeaponSelection FgColor		"0 0 0 0"	Linear 0.0 0.1
	Animate HudWeaponSelection TextColor		"0 0 0 0"	Linear 0.0 0.1
	Animate HudWeaponSelection Alpha		"0" 		Linear 0.0 0.1
	Animate HudWeaponSelection SelectionAlpha 	"0" 		Linear 0.0 0.1
}

event FadeOutWeaponSelectionMenu
{
	// slowly hide the whole thing
	Animate HudWeaponSelection FgColor		"0 0 0 0"	Linear 0.5 1.0
	Animate HudWeaponSelection TextColor		"0 0 0 0"	Linear 0.5 1.0
	Animate HudWeaponSelection Alpha		"0" 		Linear 0.5 1.0
	Animate HudWeaponSelection SelectionAlpha 	"0" 		Linear 0.5 1.0

	Animate HudWeaponSelection WeaponBoxDist1Alpha	"0 0 0 0"	Linear 0.0 0.5
	Animate HudWeaponSelection WeaponBoxDist2Alpha	"0 0 0 0"	Linear 0.0 0.5
	Animate HudWeaponSelection WeaponBoxDist3Alpha	"0 0 0 0"	Linear 0.0 0.5
}


event ShowStatusBar
{
	//show the health and armor bars
	Animate HudHealth Alpha 		"255"		Linear 0.0 0.0
	Animate HudArmor Alpha 			"255"		Linear 0.0 0.0
}
event HideStatusBar
{
	//now hide those damn things
	Animate HudHealth Alpha 		"0"		Linear 0.0 0.0
	Animate HudArmor Alpha 			"0"		Linear 0.0 0.0
}
event StatusBarFlash
{
	//show the health and armor bars
	Animate HudHealth Alpha 		"255"		Linear 0.0 0.1
	Animate HudArmor Alpha 			"255"		Linear 0.0 0.1

	//now hide those damn things
	Animate HudHealth Alpha 		"0"		Linear 2.0 1.0
	Animate HudArmor Alpha 			"0"		Linear 2.0 1.0
}
//event SuitAuxPowerNotMax
//{
	// show suit power
//	Animate HudSuitPower BgColor		"BgColor"		Linear 0.0 0.4
//	Animate HudSuitPower AuxPowerColor	"255 220 0 220"		Linear 0.0 0.4
//}