class PerksPointsDisplayController extends inkLogicController
{
	protected editable var m_desc1Text : inkTextRef;
	protected editable var m_value1Text : inkTextRef;
	protected editable var m_icon1 : inkImageRef;
	protected editable var m_desc2Text : inkTextRef;
	protected editable var m_value2Text : inkTextRef;
	protected editable var m_icon2 : inkImageRef;
	protected editable var m_desc3Text : inkTextRef;
	protected editable var m_value3Text : inkTextRef;
	protected editable var m_icon3 : inkImageRef;
	private var m_screenType : CharacterScreenType;

	public function Setup( type : CharacterScreenType )
	{
		m_screenType = type;
		switch( type )
		{
			case CharacterScreenType.Attributes:
				SetDescriptions( GetLocalizedText( "LocKey#40622" ), GetLocalizedText( "LocKey#40623" ) );
			SetIcons( 'ico_points_attribs', 'ico_points_perks' );
			GetRootWidget().SetState( 'Default' );
			break;
			case CharacterScreenType.Perks:
				SetDescriptions( GetLocalizedText( "LocKey#40624" ), GetLocalizedText( "LocKey#40623" ) );
			SetIcons( 'ico_points_perks', 'ico_points_perks' );
			break;
		}
		inkTextRef.SetVisible( m_desc1Text, type == CharacterScreenType.Attributes );
		inkTextRef.SetVisible( m_value1Text, type == CharacterScreenType.Attributes );
		inkImageRef.SetVisible( m_icon1, type == CharacterScreenType.Attributes );
	}

	public function SetValues( value1 : Int32, value2 : Int32, value3 : Int32 )
	{
		SetValues( value1, value2 );
		inkTextRef.SetText( m_value3Text, IntToString( value3 ) );
	}

	public function SetValues( value1 : Int32, value2 : Int32 )
	{
		inkTextRef.SetText( m_value1Text, IntToString( value1 ) );
		inkTextRef.SetText( m_value2Text, IntToString( value2 ) );
	}

	private function SetDescriptions( const desc1 : ref< String >, const desc2 : ref< String > )
	{
		inkTextRef.SetText( m_desc1Text, desc1 );
		inkTextRef.SetText( m_desc2Text, desc2 );
	}

	private function SetIcons( part1 : CName, part2 : CName )
	{
		inkImageRef.SetTexturePart( m_icon1, part1 );
		inkImageRef.SetTexturePart( m_icon2, part2 );
	}

}

