protected void SetCategoryLoading(string categoryName, bool loading) { ThumbnailCategory foundCategory = categories.Find( category => { return(category.GetName() == categoryName); }); if (foundCategory != null) { foundCategory.SetLoading(loading); } }
protected void SetCategoryEnabled(string categoryName, bool enabled) { ThumbnailCategory foundCategory = categories.Find( category => { return(category.GetName() == categoryName); }); if (foundCategory != null) { foundCategory.SetEnabled(enabled); } }
protected void AddThumbnail(ThumbnailItem thumbnail, string categoryName = null) { ThumbnailCategory foundCategory = categories.Find( category => { return(category.GetName() == categoryName); }); if (foundCategory != null) { foundCategory.AddThumbnail(thumbnail); } }
protected void AddCategory(string name = null, string placeholderText = null) { ThumbnailCategory thumbnailCategory = Instantiate(thumbnailCategoryPrefab, thumbnailCategoryContainer.transform).GetComponent <ThumbnailCategory>(); // thumbnailCategory.transform.parent = thumbnailCategoryContainer.transform; thumbnailCategory.SetName(name); if (placeholderText != null) { thumbnailCategory.SetPlaceholderText(placeholderText); } categories.Add(thumbnailCategory); thumbnailCategory.SetFilter(DoesThumbnailMatchSearch); }