private void InitIfNeeded()
		{
			if (this.m_ListAreaState == null)
			{
				this.m_ListAreaState = new ObjectListAreaState();
			}
			if (this.m_ListArea == null)
			{
				this.m_ListArea = new ObjectListArea(this.m_ListAreaState, this, true);
				this.m_ListArea.allowDeselection = false;
				this.m_ListArea.allowDragging = false;
				this.m_ListArea.allowFocusRendering = false;
				this.m_ListArea.allowMultiSelect = false;
				this.m_ListArea.allowRenaming = false;
				this.m_ListArea.allowBuiltinResources = true;
				ObjectListArea expr_82 = this.m_ListArea;
				expr_82.repaintCallback = (Action)Delegate.Combine(expr_82.repaintCallback, new Action(base.Repaint));
				ObjectListArea expr_A9 = this.m_ListArea;
				expr_A9.itemSelectedCallback = (Action<bool>)Delegate.Combine(expr_A9.itemSelectedCallback, new Action<bool>(this.ListAreaItemSelectedCallback));
				this.m_ListArea.gridSize = this.m_StartGridSize.value;
				SearchFilter searchFilter = new SearchFilter();
				searchFilter.nameFilter = this.m_SearchFilter;
				if (!string.IsNullOrEmpty(this.m_RequiredType))
				{
					searchFilter.classNames = new string[]
					{
						this.m_RequiredType
					};
				}
				this.m_ListArea.Init(this.listPosition, (!this.m_IsShowingAssets) ? HierarchyType.GameObjects : HierarchyType.Assets, searchFilter, true);
			}
		}
 public LocalGroup(ObjectListArea owner, string groupTitle, bool showNone)
   : base(owner, groupTitle)
 {
   this.m_ShowNoneItem = showNone;
   this.m_ListMode = false;
   this.InitBuiltinResources();
   this.ItemsWantedShown = int.MaxValue;
   this.m_Collapsable = false;
 }
 private bool SkipGroup(ObjectListArea.Group group)
 {
   if (this.m_ShowLocalAssetsOnly)
   {
     if (group is ObjectListArea.AssetStoreGroup)
       return true;
   }
   else if (group is ObjectListArea.LocalGroup)
     return true;
   return false;
 }
 public AssetStoreGroup(ObjectListArea owner, string groupTitle, string groupName)
   : base(owner, groupTitle)
 {
   this.m_Assets = new List<AssetStoreAsset>();
   this.m_Name = groupName;
   this.m_ListMode = false;
   this.m_ShowMoreDims = (Vector3) EditorStyles.miniButton.CalcSize(new GUIContent("Show more"));
   this.m_Owner.UpdateGroupSizes((ObjectListArea.Group) this);
   this.ItemsWantedShown = 3 * this.m_Grid.columns;
 }
 public Group(ObjectListArea owner, string groupTitle)
 {
   this.m_GroupSeparatorTitle = groupTitle;
   if (ObjectListArea.Group.s_Empty == null)
     ObjectListArea.Group.s_Empty = new int[0];
   this.m_Owner = owner;
   this.Visible = this.visiblePreference;
 }
 private void UpdateGroupSizes(ObjectListArea.Group g)
 {
   if (g.ListMode)
   {
     g.m_Grid.fixedWidth = this.m_VisibleRect.width;
     g.m_Grid.itemSize = new Vector2(this.m_VisibleRect.width, 16f);
     g.m_Grid.topMargin = 0.0f;
     g.m_Grid.bottomMargin = 0.0f;
     g.m_Grid.leftMargin = 0.0f;
     g.m_Grid.rightMargin = 0.0f;
     g.m_Grid.verticalSpacing = 0.0f;
     g.m_Grid.minHorizontalSpacing = 0.0f;
     g.m_Grid.InitNumRowsAndColumns(g.ItemCount, g.ItemsWantedShown);
     g.UpdateHeight();
   }
   else
   {
     g.m_Grid.fixedWidth = this.m_TotalRect.width;
     g.m_Grid.itemSize = new Vector2((float) this.gridSize, (float) (this.gridSize + 14));
     g.m_Grid.topMargin = 10f;
     g.m_Grid.bottomMargin = 10f;
     g.m_Grid.leftMargin = 10f;
     g.m_Grid.rightMargin = 10f;
     g.m_Grid.verticalSpacing = 15f;
     g.m_Grid.minHorizontalSpacing = 12f;
     g.m_Grid.InitNumRowsAndColumns(g.ItemCount, g.m_Grid.CalcRows(g.ItemsWantedShown));
     g.UpdateHeight();
   }
 }
 public void Init()
 {
   if (this.Initialized())
     return;
   this.m_FocusSearchField = false;
   if (this.m_SearchFilter == null)
     this.m_DirectoriesAreaWidth = Mathf.Min(this.position.width / 2f, 200f);
   if (this.m_SearchFilter == null)
     this.m_SearchFilter = new SearchFilter();
   this.m_SearchFieldText = this.m_SearchFilter.FilterToSearchFieldString();
   this.CalculateRects();
   this.RefreshSelectedPath();
   this.SetupDroplists();
   if (this.m_ListAreaState == null)
     this.m_ListAreaState = new ObjectListAreaState();
   this.m_ListAreaState.m_RenameOverlay.isRenamingFilename = true;
   this.m_ListArea = new ObjectListArea(this.m_ListAreaState, (EditorWindow) this, false);
   this.m_ListArea.allowDeselection = true;
   this.m_ListArea.allowDragging = true;
   this.m_ListArea.allowFocusRendering = true;
   this.m_ListArea.allowMultiSelect = true;
   this.m_ListArea.allowRenaming = true;
   this.m_ListArea.allowBuiltinResources = false;
   this.m_ListArea.allowUserRenderingHook = true;
   this.m_ListArea.allowFindNextShortcut = true;
   this.m_ListArea.foldersFirst = this.GetShouldShowFoldersFirst();
   this.m_ListArea.repaintCallback += new System.Action(((EditorWindow) this).Repaint);
   this.m_ListArea.itemSelectedCallback += new System.Action<bool>(this.ListAreaItemSelectedCallback);
   this.m_ListArea.keyboardCallback += new System.Action(this.ListAreaKeyboardCallback);
   this.m_ListArea.gotKeyboardFocus += new System.Action(this.ListGotKeyboardFocus);
   this.m_ListArea.drawLocalAssetHeader += new Func<Rect, float>(this.DrawLocalAssetHeader);
   this.m_ListArea.assetStoreSearchEnded += new System.Action(this.AssetStoreSearchEndedCallback);
   this.m_ListArea.gridSize = this.m_StartGridSize;
   this.m_StartGridSize = Mathf.Clamp(this.m_StartGridSize, this.m_ListArea.minGridSize, this.m_ListArea.maxGridSize);
   this.m_LastFoldersGridSize = Mathf.Min(this.m_LastFoldersGridSize, (float) this.m_ListArea.maxGridSize);
   this.InitListArea();
   this.SyncFilterGUI();
   if (this.m_FolderTreeState == null)
     this.m_FolderTreeState = new TreeViewState();
   this.m_FolderTreeState.renameOverlay.isRenamingFilename = true;
   if (this.m_AssetTreeState == null)
     this.m_AssetTreeState = new TreeViewState();
   this.m_AssetTreeState.renameOverlay.isRenamingFilename = true;
   this.InitViewMode(this.m_ViewMode);
   this.m_SearchAreaMenu = new ExposablePopupMenu();
   this.RefreshSearchText();
   this.DefaultSetup();
 }
 private void InitIfNeeded()
 {
   if (this.m_ListAreaState == null)
     this.m_ListAreaState = new ObjectListAreaState();
   if (this.m_ListArea != null)
     return;
   this.m_ListArea = new ObjectListArea(this.m_ListAreaState, (EditorWindow) this, true);
   this.m_ListArea.allowDeselection = false;
   this.m_ListArea.allowDragging = false;
   this.m_ListArea.allowFocusRendering = false;
   this.m_ListArea.allowMultiSelect = false;
   this.m_ListArea.allowRenaming = false;
   this.m_ListArea.allowBuiltinResources = true;
   this.m_ListArea.repaintCallback += new System.Action(((EditorWindow) this).Repaint);
   this.m_ListArea.itemSelectedCallback += new System.Action<bool>(this.ListAreaItemSelectedCallback);
   this.m_ListArea.gridSize = this.m_StartGridSize.value;
   SearchFilter searchFilter = new SearchFilter();
   searchFilter.nameFilter = this.m_SearchFilter;
   if (!string.IsNullOrEmpty(this.m_RequiredType))
     searchFilter.classNames = new string[1]
     {
       this.m_RequiredType
     };
   this.m_ListArea.Init(this.listPosition, !this.m_IsShowingAssets ? HierarchyType.GameObjects : HierarchyType.Assets, searchFilter, true);
 }
 private void InitIfNeeded()
 {
     if (this.m_ListAreaState == null)
     {
         this.m_ListAreaState = new ObjectListAreaState();
     }
     if (this.m_ListArea == null)
     {
         this.m_ListArea = new ObjectListArea(this.m_ListAreaState, this, true);
         this.m_ListArea.allowDeselection = false;
         this.m_ListArea.allowDragging = false;
         this.m_ListArea.allowFocusRendering = false;
         this.m_ListArea.allowMultiSelect = false;
         this.m_ListArea.allowRenaming = false;
         this.m_ListArea.allowBuiltinResources = true;
         this.m_ListArea.repaintCallback = (Action) Delegate.Combine(this.m_ListArea.repaintCallback, new Action(this, (IntPtr) this.Repaint));
         this.m_ListArea.itemSelectedCallback = (Action<bool>) Delegate.Combine(this.m_ListArea.itemSelectedCallback, new Action<bool>(this.ListAreaItemSelectedCallback));
         this.m_ListArea.gridSize = this.m_StartGridSize.value;
         this.FilterSettingsChanged();
     }
 }
		public void Init()
		{
			if (this.Initialized())
			{
				return;
			}
			this.m_FocusSearchField = false;
			bool flag = this.m_SearchFilter == null;
			if (flag)
			{
				this.m_DirectoriesAreaWidth = Mathf.Min(base.position.width / 2f, 200f);
			}
			if (this.m_SearchFilter == null)
			{
				this.m_SearchFilter = new SearchFilter();
			}
			this.m_SearchFieldText = this.m_SearchFilter.FilterToSearchFieldString();
			this.CalculateRects();
			this.RefreshSelectedPath();
			this.SetupDroplists();
			if (this.m_ListAreaState == null)
			{
				this.m_ListAreaState = new ObjectListAreaState();
			}
			this.m_ListAreaState.m_RenameOverlay.isRenamingFilename = true;
			this.m_ListArea = new ObjectListArea(this.m_ListAreaState, this, false);
			this.m_ListArea.allowDeselection = true;
			this.m_ListArea.allowDragging = true;
			this.m_ListArea.allowFocusRendering = true;
			this.m_ListArea.allowMultiSelect = true;
			this.m_ListArea.allowRenaming = true;
			this.m_ListArea.allowBuiltinResources = false;
			this.m_ListArea.allowUserRenderingHook = true;
			this.m_ListArea.allowFindNextShortcut = true;
			this.m_ListArea.foldersFirst = this.GetShouldShowFoldersFirst();
			ObjectListArea expr_131 = this.m_ListArea;
			expr_131.repaintCallback = (Action)Delegate.Combine(expr_131.repaintCallback, new Action(base.Repaint));
			ObjectListArea expr_158 = this.m_ListArea;
			expr_158.itemSelectedCallback = (Action<bool>)Delegate.Combine(expr_158.itemSelectedCallback, new Action<bool>(this.ListAreaItemSelectedCallback));
			ObjectListArea expr_17F = this.m_ListArea;
			expr_17F.keyboardCallback = (Action)Delegate.Combine(expr_17F.keyboardCallback, new Action(this.ListAreaKeyboardCallback));
			ObjectListArea expr_1A6 = this.m_ListArea;
			expr_1A6.gotKeyboardFocus = (Action)Delegate.Combine(expr_1A6.gotKeyboardFocus, new Action(this.ListGotKeyboardFocus));
			ObjectListArea expr_1CD = this.m_ListArea;
			expr_1CD.drawLocalAssetHeader = (Func<Rect, float>)Delegate.Combine(expr_1CD.drawLocalAssetHeader, new Func<Rect, float>(this.DrawLocalAssetHeader));
			ObjectListArea expr_1F4 = this.m_ListArea;
			expr_1F4.assetStoreSearchEnded = (Action)Delegate.Combine(expr_1F4.assetStoreSearchEnded, new Action(this.AssetStoreSearchEndedCallback));
			this.m_ListArea.gridSize = this.m_StartGridSize;
			this.m_StartGridSize = Mathf.Clamp(this.m_StartGridSize, this.m_ListArea.minGridSize, this.m_ListArea.maxGridSize);
			this.m_LastFoldersGridSize = Mathf.Min(this.m_LastFoldersGridSize, (float)this.m_ListArea.maxGridSize);
			this.InitListArea();
			this.SyncFilterGUI();
			if (this.m_FolderTreeState == null)
			{
				this.m_FolderTreeState = new TreeViewState();
			}
			this.m_FolderTreeState.renameOverlay.isRenamingFilename = true;
			if (this.m_AssetTreeState == null)
			{
				this.m_AssetTreeState = new TreeViewState();
			}
			this.m_AssetTreeState.renameOverlay.isRenamingFilename = true;
			this.InitViewMode(this.m_ViewMode);
			this.m_SearchAreaMenu = new ExposablePopupMenu();
			this.RefreshSearchText();
			this.DefaultSetup();
		}