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); }
void SetLocalGridItemInfo(VCEAssetMgr.IsoFileInfo _isoFileInfo, UIWorkShopGridItem item) { string isoName = _isoFileInfo.m_Name; if (_isoFileInfo.m_IsFolder) { item.InitItem(WorkGridItemType.mLocalFloder, isoName); item.SetIco(null); } else { VCIsoHeadData headData; VCIsoData.ExtractHeader(_isoFileInfo.m_Path, out headData); item.InitItem(WorkGridItemType.mLocalIcon, isoName); Texture2D texture = new Texture2D(256, 256); texture.LoadImage(headData.IconTex); item.SetIco(texture); item.SetAuthor(headData.Author); } }