示例#1
0
    void SetWorkShopGridItemInfo(SteamPreFileAndVoteDetail del, UIWorkShopGridItem item)
    {
        if (item == null)
        {
            return;
        }
        item.gameObject.SetActive(true);

        if (del != null)
        {
            item.SetIsoName(del.m_rgchTitle);
            item.SetDownloaded(UIWorkShopCtrl.CheckDownloadExist(del.m_rgchTitle + VCConfig.s_IsoFileExt));
            if (del.m_aPreFileData != null)
            {
                VCIsoHeadData headData = new VCIsoHeadData();
                headData.SteamPreview = del.m_aPreFileData;
                item.SetAuthor(PELocalization.GetString(8000696));
                Texture2D texture = new Texture2D(4, 4);
                texture.LoadImage(headData.IconTex);
                item.SetIco(texture);
            }
            else
            {
                item.SetIco(null);
            }
        }
        else
        {
            item.SetIco(null);
            item.SetIsoName(PELocalization.GetString(8000695));
            item.SetAuthor(PELocalization.GetString(8000695));
        }

        item.ActiveLoadingItem(false);
    }
示例#2
0
    public void SetItemIsDownloadedByFileName(string fileName)
    {
        UIWorkShopGridItem item = this.mWorkShopGridCtrl.GetWorkShopItemByFileName(fileName);

        if (null != item)
        {
            item.SetDownloaded(true);
        }
    }