/* * public void ShowMusicProfiles() { * //Debug.Log("SkillTrainerUI.ShowSkills()"); * ShowAudioProfilesCommon(musicPlayer); * } */ public void ShowAudioProfiles(MusicPlayerComponent musicPlayer) { //Debug.Log("SkillTrainerUI.ShowSkills(" + skillTrainer.name + ")"); this.musicPlayer = musicPlayer; audioType = musicPlayer.Props.AudioType; ShowAudioProfilesCommon(this.musicPlayer); }
public void ShowAudioProfilesCommon(MusicPlayerComponent musicPlayer) { //Debug.Log("MusicPlayerUI.ShowAudioProfilesCommon()"); ClearMusicProfiles(); MusicPlayerHighlightButton firstAvailableAudioProfile = null; foreach (AudioProfile audioProfile in musicPlayer.Props.AudioProfileList) { GameObject go = objectPooler.GetPooledObject(highlightButtonPrefab, availableArea.transform); MusicPlayerHighlightButton qs = go.GetComponent <MusicPlayerHighlightButton>(); qs.Configure(systemGameManager); qs.Text.text = audioProfile.DisplayName; qs.Text.color = Color.white; qs.SetMusicProfile(this, audioProfile); musicPlayerHighlightButtons.Add(qs); audioProfileList.Add(audioProfile); uINavigationControllers[0].AddActiveButton(qs); if (firstAvailableAudioProfile == null) { firstAvailableAudioProfile = qs; } } if (firstAvailableAudioProfile == null) { // no available skills anymore, close window uIManager.musicPlayerWindow.CloseWindow(); } //if (SelectedMusicPlayerHighlightButton == null && firstAvailableAudioProfile != null) { if (firstAvailableAudioProfile != null) { //firstAvailableAudioProfile.Select(); uINavigationControllers[0].FocusFirstButton(); } }