2025-06-14 14:42:49 -04:00
|
|
|
using System;
|
2025-06-03 02:42:28 -04:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2025-06-14 14:42:49 -04:00
|
|
|
using Ichni.Menu;
|
|
|
|
|
using Ichni.Menu.UI;
|
|
|
|
|
using Ichni.UI;
|
2025-06-03 02:42:28 -04:00
|
|
|
using UnityEngine;
|
2025-07-08 14:28:40 -04:00
|
|
|
using UnityEngine.UI;
|
2025-06-03 02:42:28 -04:00
|
|
|
|
2025-07-08 14:28:40 -04:00
|
|
|
namespace Ichni.Menu.UI
|
2025-06-03 02:42:28 -04:00
|
|
|
{
|
2025-06-06 10:14:55 -04:00
|
|
|
public class SongSelectionUIPage : UIPageBase
|
2025-06-03 02:42:28 -04:00
|
|
|
{
|
2025-06-14 14:42:49 -04:00
|
|
|
public GameObject songSelectionTabPrefab;
|
|
|
|
|
public RectTransform songSelectionTabContainer;
|
|
|
|
|
public List<SongSelectionTabUI> songSelectionTabs;
|
|
|
|
|
|
2025-07-08 14:28:40 -04:00
|
|
|
public bool isLowpassing;
|
|
|
|
|
public Button lowPassFilterButton;
|
|
|
|
|
public bool isHighpassing;
|
|
|
|
|
public Button highPassFilterButton;
|
|
|
|
|
|
2025-06-14 14:42:49 -04:00
|
|
|
private void Start()
|
|
|
|
|
{
|
2025-07-08 14:28:40 -04:00
|
|
|
//GenerateSongTabs();
|
|
|
|
|
|
|
|
|
|
lowPassFilterButton.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("Low Pass Filter Button Clicked");
|
|
|
|
|
isLowpassing = !isLowpassing;
|
|
|
|
|
float value = isLowpassing ? 33f : 100f;
|
|
|
|
|
MenuAudioManager.instance.audioContainer.SetRTPC("PreviewLowPassFilter", value);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
highPassFilterButton.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("High Pass Filter Button Clicked");
|
|
|
|
|
isHighpassing = !isHighpassing;
|
|
|
|
|
float value = isHighpassing ? 33f : 100f;
|
|
|
|
|
MenuAudioManager.instance.audioContainer.SetRTPC("PreviewHighPassFilter", value);
|
|
|
|
|
});
|
2025-06-14 14:42:49 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void GenerateSongTabs()
|
|
|
|
|
{
|
|
|
|
|
string chapter = ChapterSelectionManager.instance.currentChapter;
|
|
|
|
|
ChapterSelectionUnit chapterUnit = ChapterSelectionManager.instance.chapters.Find(c => c.chapterIndex == chapter);
|
|
|
|
|
foreach (SongItemData song in chapterUnit.songs)
|
|
|
|
|
{
|
|
|
|
|
SongSelectionTabUI tab = Instantiate(songSelectionTabPrefab, songSelectionTabContainer).GetComponent<SongSelectionTabUI>();
|
|
|
|
|
tab.SetUpTab(song);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-06-03 02:42:28 -04:00
|
|
|
|
2025-06-14 14:42:49 -04:00
|
|
|
private void ClearTabs()
|
|
|
|
|
{
|
|
|
|
|
foreach (SongSelectionTabUI tab in songSelectionTabs)
|
|
|
|
|
{
|
|
|
|
|
Destroy(tab.gameObject);
|
|
|
|
|
}
|
|
|
|
|
songSelectionTabs.Clear();
|
|
|
|
|
}
|
2025-06-03 02:42:28 -04:00
|
|
|
}
|
|
|
|
|
}
|