/// <summary> /// Syncs the layout. /// </summary> /// <returns><c>true</c>, if layout was synced, <c>false</c> otherwise.</returns> /// <param name="pool">Pool.</param> public bool SyncLayout(ZEntityPoolTree pool) { List <ZEntityNode> newItems = pool.GetAllEntities(); if (items == null || items.Count == 0) { //newItems = pool.GetAllEntities(); } else { var delItems = items.Where((a) => newItems.Find((b) => b.ID == a.wndID) != null).ToList(); items = delItems; newItems = newItems.Where((a) => items.Find((b) => b.wndID == a.ID) == null).ToList(); } foreach (var n in newItems) { EditorWindowLayoutItem item = new EditorWindowLayoutItem(); item.wndID = n.ID; item.title = n.Name; item.rect = GetRandomRect(); items.Add(item); } return(newItems.Count > 0); ///pool.Entities.Join(items, (a)=> a }
protected virtual void PreDrawNodeWindow(EditorWindowLayoutItem item) { }