class NewCodexEntryGameController extends inkGameController
{
	private editable var m_label : inkTextRef;
	private var m_animationProxy : inkAnimProxy;
	private var m_data : NewCodexEntryUserData;

	protected event OnInitialize()
	{
		m_data = ( ( NewCodexEntryUserData )( GetRootWidget().GetUserData( 'NewCodexEntryUserData' ) ) );
		Setup();
	}

	private function Setup()
	{
		inkTextRef.SetText( m_label, m_data.data );
		PlayIntroAnimation();
	}

	private function PlayIntroAnimation()
	{
		m_animationProxy = PlayLibraryAnimation( 'Outro' );
		m_animationProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnOutroAnimFinished' );
	}

	protected event OnOutroAnimFinished( anim : inkAnimProxy )
	{
		var fakeData : inkGameNotificationData;
		m_data.token.TriggerCallback( fakeData );
	}

}

