Beispiel #1
0
 public UIResourcePackSelectionMenu(AssetSourceController sourceController, ResourcePackList currentResourcePackList)
 {
     _sourceController = sourceController;
     BuildPage();
     _packsList = currentResourcePackList;
     PopulatePackList();
 }
Beispiel #2
0
        public void UseResourcePacks(ResourcePackList resourcePacks)
        {
            if (this.OnResourcePackChange != null)
            {
                this.OnResourcePackChange(resourcePacks);
            }
            ActiveResourcePackList = resourcePacks;
            List <IContentSource> list = new List <IContentSource>(from pack in resourcePacks.EnabledPacks
                                                                   orderby pack.SortingOrder
                                                                   select pack.GetContentSource());

            list.AddRange(_staticSources);
            foreach (IContentSource item in list)
            {
                item.ClearRejections();
            }
            _assetRepository.SetSources((IEnumerable <IContentSource>)list, Main.content, (AssetRequestMode)1);
        }
Beispiel #3
0
        public void UseResourcePacks(ResourcePackList resourcePacks)
        {
            if (this.OnResourcePackChange != null)
            {
                this.OnResourcePackChange(resourcePacks);
            }
            this.ActiveResourcePackList = resourcePacks;
            List <IContentSource> icontentSourceList = new List <IContentSource>(resourcePacks.EnabledPacks.OrderBy <ResourcePack, int>((Func <ResourcePack, int>)(pack => pack.SortingOrder)).Select <ResourcePack, IContentSource>((Func <ResourcePack, IContentSource>)(pack => pack.GetContentSource())));

            icontentSourceList.AddRange((IEnumerable <IContentSource>) this._staticSources);
            using (List <IContentSource> .Enumerator enumerator = icontentSourceList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    enumerator.Current.ClearRejections();
                }
            }
            this._assetRepository.SetSources((IEnumerable <IContentSource>)icontentSourceList, (AssetRequestMode)1);
        }