ContentLibraryItemViewModel CreateCustomRepo(SixRepo repo, LibraryGroupViewModel group) { var libItem = new BrowseContentLibraryItemViewModel <SixRepo>(_library, repo, @group: group, isFeatured: true); foreach (var modSet in repo.CollectionItems) { modSet.UpdateState(); var customRepoCollectionLibraryItem = new CustomRepoCollectionLibraryItemViewModel(_library, modSet, null, true); libItem.Children.AddLocked(customRepoCollectionLibraryItem); libItem.Items.AddLocked(modSet); } return(libItem); }
void SetupBuiltInPlaylist() { var container = new BuiltInContentContainer("Playlist"); SyncCgsMods(_game.CalculatedSettings.CurrentMods, container); _disposables.Add(_game.CalculatedSettings.WhenAnyValue(x => x.CurrentMods) .Subscribe(x => SyncCgsMods(x, container))); var playlist = new BrowseContentLibraryItemViewModel <BuiltInContentContainer>(_library, container, SixIconFont.withSIX_icon_Play) { Description = "All mods that will be used to Launch or Update, incl dependencies and server mods", IsFeatured = true, IsRoot = true, IconForeground = SixColors.SixGreen, SortOrder = 1 }; Items.Add(playlist); }