class MenuScenario_Storage extends MenuScenario_BaseMenu
{

	protected event OnEnterScenario( prevScenario : CName, userData : IScriptable )
	{
		OpenMenu( 'vendor_hub_menu', userData, ScreenDisplayContext.Storage );
		SwitchMenu( 'fullscreen_vendor', userData, ScreenDisplayContext.Storage );
	}

	protected event OnLeaveScenario( nextScenario : CName )
	{
		if( m_currMenuName != '' )
		{
			GetMenusState().DispatchEvent( m_currMenuName, 'OnBeforeLeaveScenario' );
			m_currMenuName = '';
		}
		super.OnLeaveScenario( nextScenario );
	}

	protected event OnVendorClose()
	{
		GotoIdleState();
	}

	protected override function GotoIdleState()
	{
		GetMenusState().DispatchEvent( 'vendor_hub_menu', 'OnBack' );
		SwitchToScenario( 'MenuScenario_Idle' );
	}

	protected event OnCloseHubMenuRequest()
	{
		GotoIdleState();
	}

}

class StorageUserData extends IScriptable
{
	var storageObject : weak< GameObject >;
}

