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

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

        if (foundCategory != null)
        {
            foundCategory.SetEnabled(enabled);
        }
    }
示例#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);
        }
    }
示例#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);
    }