menu
This commit is contained in:
@@ -13,6 +13,8 @@ namespace Ichni.Menu.UI
|
||||
public partial class SongSelectionTab : MonoBehaviour
|
||||
{
|
||||
private SongListControllerUI songListController => MenuManager.instance.songSelectionUIPage.songListController;
|
||||
|
||||
public bool isLocked;
|
||||
|
||||
public SongItemData connectedSong;
|
||||
public TMP_Text songNameText;
|
||||
@@ -25,11 +27,15 @@ namespace Ichni.Menu.UI
|
||||
public RectTransform background;
|
||||
public Image selectedImage;
|
||||
public Image unselectedImage;
|
||||
public Image lockMark;
|
||||
|
||||
public void SetUpTab(SongItemData song)
|
||||
{
|
||||
connectedSong = song;
|
||||
songNameText.text = song.songName;
|
||||
|
||||
isLocked = !GameSaveManager.instance.SongSaveModule.CheckUnlock(song.unlockKey);
|
||||
lockMark.gameObject.SetActive(isLocked);
|
||||
|
||||
quickSwitchButton.onClick.AddListener(() =>
|
||||
{
|
||||
@@ -83,12 +89,5 @@ namespace Ichni.Menu.UI
|
||||
.Play();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPreview()
|
||||
{
|
||||
MenuAudioManager.instance.audioContainer.StopEvent("PlayPreview");
|
||||
MenuAudioManager.instance.audioContainer.SetSwitch(connectedSong.songSwitch);
|
||||
MenuAudioManager.instance.audioContainer.PostEvent("PlayPreview");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user