Example #1
0
    protected void SetCategoryLoading(string categoryName, bool loading)
    {
        ThumbnailCategory foundCategory = categories.Find(
            category => { return(category.GetName() == categoryName); });

        if (foundCategory != null)
        {
            foundCategory.SetLoading(loading);
        }
    }
Example #2
0
    protected void SetCategoryEnabled(string categoryName, bool enabled)
    {
        ThumbnailCategory foundCategory = categories.Find(
            category => { return(category.GetName() == categoryName); });

        if (foundCategory != null)
        {
            foundCategory.SetEnabled(enabled);
        }
    }
Example #3
0
    protected void AddThumbnail(ThumbnailItem thumbnail, string categoryName = null)
    {
        ThumbnailCategory foundCategory = categories.Find(
            category => { return(category.GetName() == categoryName); });

        if (foundCategory != null)
        {
            foundCategory.AddThumbnail(thumbnail);
        }
    }
Example #4
0
    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);
    }