class Crosshair_Power_Tactician extends gameuiCrosshairBaseGameController
{
	private editable var m_leftPart : inkWidgetRef;
	private editable var m_rightPart : inkWidgetRef;
	private editable var m_topPart : inkWidgetRef;
	private editable var m_botPart : inkWidgetRef;

	public override function GetIntroAnimation( firstEquip : Bool ) : inkAnimProxy
	{
		var anim : inkAnimDef;
		var alphaInterpolator : inkAnimTransparency;
		anim = new inkAnimDef;
		alphaInterpolator = new inkAnimTransparency;
		alphaInterpolator.SetStartTransparency( 0.0 );
		alphaInterpolator.SetEndTransparency( 1.0 );
		alphaInterpolator.SetDuration( 0.25 );
		alphaInterpolator.SetType( inkanimInterpolationType.Linear );
		alphaInterpolator.SetMode( inkanimInterpolationMode.EasyIn );
		anim.AddInterpolator( alphaInterpolator );
		return m_rootWidget.PlayAnimation( anim );
	}

	public override function GetOutroAnimation() : inkAnimProxy
	{
		var anim : inkAnimDef;
		var alphaInterpolator : inkAnimTransparency;
		anim = new inkAnimDef;
		alphaInterpolator = new inkAnimTransparency;
		alphaInterpolator.SetStartTransparency( 1.0 );
		alphaInterpolator.SetEndTransparency( 0.0 );
		alphaInterpolator.SetDuration( 0.25 );
		alphaInterpolator.SetType( inkanimInterpolationType.Linear );
		alphaInterpolator.SetMode( inkanimInterpolationMode.EasyIn );
		anim.AddInterpolator( alphaInterpolator );
		return m_rootWidget.PlayAnimation( anim );
	}

	protected event OnBulletSpreadChanged( spread : Vector2 )
	{
		super.OnBulletSpreadChanged( spread );
		inkWidgetRef.SetMargin( m_leftPart, inkMargin( -( spread.X ), 0.0, 0.0, 0.0 ) );
		inkWidgetRef.SetMargin( m_rightPart, inkMargin( spread.X, 0.0, 0.0, 0.0 ) );
		inkWidgetRef.SetMargin( m_topPart, inkMargin( 0.0, spread.Y, 0.0, 0.0 ) );
		inkWidgetRef.SetMargin( m_botPart, inkMargin( 0.0, -( spread.Y ), 0.0, 0.0 ) );
	}

	protected override function ApplyCrosshairGUIState( state : CName, aimedAtEntity : Entity )
	{
		inkWidgetRef.SetState( m_leftPart, state );
		inkWidgetRef.SetState( m_rightPart, state );
		inkWidgetRef.SetState( m_topPart, state );
		inkWidgetRef.SetState( m_botPart, state );
	}

}

