43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Ichni.Menu.UI
|
|
{
|
|
public class SongInfoUI : MonoBehaviour
|
|
{
|
|
public Image illustration;
|
|
public TMP_Text charterNameText;
|
|
public TMP_Text illustratorText;
|
|
|
|
public TMP_Text accuracyText;
|
|
public Image fullComboMark;
|
|
public Image allPerfectMark;
|
|
|
|
public void SetIllustration(Sprite cover, string illustratorName)
|
|
{
|
|
illustration.sprite = cover;
|
|
illustratorText.text = illustratorName;
|
|
}
|
|
|
|
public void SetCharter(string charterName)
|
|
{
|
|
charterNameText.text = charterName == string.Empty ? "Unknown Charter" : charterName;
|
|
}
|
|
|
|
public void SetBeatmapInfo(BeatmapSave beatmapSave)
|
|
{
|
|
accuracyText.text = $"{beatmapSave.accuracy * 100:F2}%";
|
|
|
|
if (!beatmapSave.isAllPerfect)
|
|
{
|
|
fullComboMark.gameObject.SetActive(beatmapSave.isFullCombo);
|
|
}
|
|
|
|
allPerfectMark.gameObject.SetActive(beatmapSave.isAllPerfect);
|
|
}
|
|
}
|
|
} |