2025-07-21 05:42:20 -04:00
|
|
|
using DG.Tweening;
|
2025-07-26 04:20:25 -04:00
|
|
|
using Ichni.RhythmGame;
|
2025-06-14 14:42:49 -04:00
|
|
|
using Ichni.UI;
|
2025-08-11 14:04:06 -04:00
|
|
|
using UnityEngine.Events;
|
2025-07-08 14:28:40 -04:00
|
|
|
using UnityEngine.UI;
|
2025-07-21 05:42:20 -04:00
|
|
|
using UnityEngine.UI.Extensions;
|
2025-06-03 02:42:28 -04:00
|
|
|
|
2025-08-11 14:04:06 -04:00
|
|
|
namespace Ichni.Menu
|
2025-06-03 02:42:28 -04:00
|
|
|
{
|
2025-07-21 05:42:20 -04:00
|
|
|
public partial class SongSelectionUIPage : UIPageBase
|
2025-06-03 02:42:28 -04:00
|
|
|
{
|
2025-08-11 14:04:06 -04:00
|
|
|
public Button backButton;
|
|
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
public Gradient2 backgroundFrames;
|
|
|
|
|
public float framePositionOffset = -1;
|
|
|
|
|
|
2025-07-10 08:42:30 -04:00
|
|
|
public SongListControllerUI songListController;
|
2025-07-21 05:42:20 -04:00
|
|
|
public PlaySongUI playSongUI;
|
|
|
|
|
public SongInfoUI songInfoUI;
|
|
|
|
|
public DifficultySelectionContainer difficultySelectionContainer;
|
2025-08-27 21:45:18 -04:00
|
|
|
//public int currentSelectedDifficultyIndex;
|
2025-06-14 14:42:49 -04:00
|
|
|
|
2025-08-11 14:04:06 -04:00
|
|
|
protected override void Awake()
|
|
|
|
|
{
|
|
|
|
|
base.Awake();
|
|
|
|
|
|
|
|
|
|
fadeOutAction = () =>
|
|
|
|
|
{
|
|
|
|
|
songListController.ClearSongTabs();
|
|
|
|
|
MenuInputManager.OnMoveUp -= songListController.GoToFormerTab;
|
|
|
|
|
MenuInputManager.OnMoveDown -= songListController.GoToNextTab;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fadeInStartAction = () =>
|
|
|
|
|
{
|
|
|
|
|
songListController.InitializeList();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fadeInFinishAction = () =>
|
|
|
|
|
{
|
|
|
|
|
MenuInputManager.OnMoveUp += songListController.GoToFormerTab;
|
|
|
|
|
MenuInputManager.OnMoveDown += songListController.GoToNextTab;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
backButton.onClick.AddListener(() =>
|
|
|
|
|
{
|
|
|
|
|
FadeOut();
|
|
|
|
|
MenuManager.instance.chapterSelectionUIPage.FadeIn();
|
|
|
|
|
MenuAudioManager.instance.audioContainer.StopEvent("PlayPreview");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
songInfoUI.SetUp();
|
|
|
|
|
}
|
2025-07-21 05:42:20 -04:00
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
2025-08-27 21:45:18 -04:00
|
|
|
MenuInformationRecorder.instance.GetRecordOfThisChapter().difficultyIndex = 0;
|
2025-07-08 14:28:40 -04:00
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
Sequence framesSeq = DOTween.Sequence();
|
|
|
|
|
framesSeq.Append(DOTween.To(() => framePositionOffset, x => framePositionOffset = x, 1f, 1f)
|
|
|
|
|
.SetEase(Ease.Linear)
|
|
|
|
|
.OnUpdate(() => backgroundFrames.Offset = framePositionOffset));
|
|
|
|
|
framesSeq.AppendInterval(4f);
|
|
|
|
|
framesSeq.SetLoops(-1, LoopType.Restart);
|
|
|
|
|
framesSeq.Play();
|
2025-06-14 14:42:49 -04:00
|
|
|
}
|
2025-06-03 02:42:28 -04:00
|
|
|
}
|
2025-07-21 05:42:20 -04:00
|
|
|
|
|
|
|
|
public partial class SongSelectionUIPage
|
|
|
|
|
{
|
|
|
|
|
public SongItemData selectedSong;
|
|
|
|
|
public DifficultyData selectedDifficulty;
|
2025-07-26 04:20:25 -04:00
|
|
|
public SongStatusSave selectedSave;
|
2025-07-21 05:42:20 -04:00
|
|
|
}
|
2025-06-03 02:42:28 -04:00
|
|
|
}
|