public void OnSearchTextChanged() { SongMeta lastSelectedSong = SelectedSong; string searchText = searchTextInputField.Text.ToLower(); if (string.IsNullOrEmpty(searchText)) { songRouletteController.SetSongs(songMetas); if (lastSelectedSong != null) { songRouletteController.SelectSong(lastSelectedSong); } else if (selectedSongBeforeSearch != null) { songRouletteController.SelectSong(selectedSongBeforeSearch); } } else { switch (searchTextInputField.SearchMode) { case SearchInputField.ESearchMode.BySongTitle: DoSearch((songMeta) => songMeta.Title.ToLower().Contains(searchText)); break; case SearchInputField.ESearchMode.ByArtist: DoSearch((songMeta) => songMeta.Artist.ToLower().Contains(searchText)); break; } } }
private void InitSongRoulette() { songRouletteController.SetSongs(songMetas); if (sceneData.SongMeta != null) { songRouletteController.SelectSong(sceneData.SongMeta); } songRouletteController.Selection.Subscribe(newValue => OnNewSongSelection(newValue)); }
public void UpdateFilteredSongs() { songRouletteController.SetSongs(GetFilteredSongMetas()); // Indicate filtered playlist via font style of song count songCountText.fontStyle = playlistSlider.SelectedItem == null || playlistSlider.SelectedItem is UltraStarAllSongsPlaylist ? FontStyles.Normal : FontStyles.Underline; }
void Start() { sceneData = SceneNavigator.Instance.GetSceneData(CreateDefaultSceneData()); searchTextInputField = GameObjectUtils.FindObjectOfType <SearchInputField>(true); songMetas = SongMetaManager.Instance.SongMetas; List <PlayerProfile> playerProfiles = PlayerProfileManager.Instance.PlayerProfiles; PopulatePlayerProfileList(playerProfiles); songRouletteController = FindObjectOfType <SongRouletteController>(); songRouletteController.SongSelectSceneController = this; songRouletteController.SetSongs(songMetas); if (sceneData.SongMeta != null) { songRouletteController.SelectSong(sceneData.SongMeta); } }
public void UpdateFilteredSongs() { songRouletteController.SetSongs(GetFilteredSongMetas()); }