class InitializeUserScreenGameController extends gameuiMenuGameController
{
	private editable var m_backgroundVideo : inkVideoRef;
	private editable var m_breachingContainer : inkCompoundRef;
	private editable var m_progressBar : inkCompoundRef;
	private var m_menuEventDispatcher : weak< inkMenuEventDispatcher >;
	private var m_requestHandler : weak< inkISystemRequestsHandler >;
	private var m_progressBarController : weak< LoadingScreenProgressBarController >;

	protected event OnInitialize()
	{
		inkVideoRef.Play( m_backgroundVideo );
		m_requestHandler = GetSystemRequestsHandler();
		m_requestHandler.RegisterToCallback( 'OnAdditionalContentDataReloadProgressCallback', this, 'OnAdditionalContentDataReloadProgress' );
		m_progressBarController = ( ( LoadingScreenProgressBarController )( inkCompoundRef.GetController( m_progressBar ) ) );
		inkCompoundRef.SetVisible( m_progressBar, false );
	}

	protected event OnUninitialize()
	{
		inkVideoRef.Stop( m_backgroundVideo );
		m_requestHandler.UnregisterFromCallback( 'OnAdditionalContentDataReloadProgressCallback', this, 'OnAdditionalContentDataReloadProgress' );
	}

	protected event OnSetMenuEventDispatcher( menuEventDispatcher : weak< inkMenuEventDispatcher > )
	{
		m_menuEventDispatcher = menuEventDispatcher;
	}

	protected event OnAdditionalContentDataReloadProgress( progress : Float )
	{
		if( progress >= 0.0 )
		{
			inkCompoundRef.SetVisible( m_breachingContainer, false );
			inkCompoundRef.SetVisible( m_progressBar, true );
			m_progressBarController.SetSpinnerVisibility( true );
			m_progressBarController.SetProgress( progress );
		}
	}

}

