设置页面
This commit is contained in:
@@ -16,11 +16,8 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.StartMenu
|
||||
{
|
||||
public partial class CreateEmptyProjectPage : MonoBehaviour
|
||||
public partial class CreateEmptyProjectPage : StartMenuPage
|
||||
{
|
||||
public CanvasGroup canvasGroup;
|
||||
public Tweener fadeIn, fadeOut;
|
||||
|
||||
public TMP_InputField projectNameInputField, creatorNameInputField, bpmInputField, songLocationInputField, delayInputField;
|
||||
public Button selectSongButton, autoFillSongPathButton;
|
||||
public Button createEmptyProjectButton;
|
||||
@@ -29,16 +26,10 @@ namespace Ichni.StartMenu
|
||||
public string songName;
|
||||
|
||||
public ThemeBundleSelector themeBundleSelector;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
InitializeAnimations();
|
||||
InitializeInfoUI();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Keyboard.current.escapeKey.wasPressedThisFrame)
|
||||
if (canvasGroup.interactable && Keyboard.current.escapeKey.wasPressedThisFrame)
|
||||
{
|
||||
fadeOut.Restart();
|
||||
}
|
||||
@@ -87,9 +78,12 @@ namespace Ichni.StartMenu
|
||||
|
||||
public partial class CreateEmptyProjectPage
|
||||
{
|
||||
private void InitializeAnimations()
|
||||
protected override void InitializeAnimations()
|
||||
{
|
||||
fadeIn = canvasGroup.DOFade(1f, 0.5f)
|
||||
fadeIn = DOTween.Sequence();
|
||||
fadeOut = DOTween.Sequence();
|
||||
|
||||
fadeIn.Join(canvasGroup.DOFade(1f, 0.5f))
|
||||
.SetEase(Ease.InOutQuad)
|
||||
.SetAutoKill(false)
|
||||
.OnComplete(() =>
|
||||
@@ -98,7 +92,7 @@ namespace Ichni.StartMenu
|
||||
canvasGroup.blocksRaycasts = true;
|
||||
}).Pause();
|
||||
|
||||
fadeOut = canvasGroup.DOFade(0f, 0.5f)
|
||||
fadeOut.Join(canvasGroup.DOFade(0f, 0.5f))
|
||||
.SetEase(Ease.InOutQuad)
|
||||
.SetAutoKill(false)
|
||||
.OnPlay(() =>
|
||||
@@ -113,7 +107,7 @@ namespace Ichni.StartMenu
|
||||
.Pause();
|
||||
}
|
||||
|
||||
private void InitializeInfoUI()
|
||||
protected override void InitializeUI()
|
||||
{
|
||||
songLocationInputField.onEndEdit.AddListener((str) =>
|
||||
{
|
||||
@@ -126,13 +120,13 @@ namespace Ichni.StartMenu
|
||||
createEmptyProjectButton.onClick.AddListener(CreateEmptyProject);
|
||||
}
|
||||
|
||||
public void AutoFillSongPath()
|
||||
private void AutoFillSongPath()
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/Songs/";
|
||||
songLocationInputField.text = path;
|
||||
}
|
||||
|
||||
public void SelectSong()
|
||||
private void SelectSong()
|
||||
{
|
||||
songFile = new OpenFileName();
|
||||
songFile.structSize = Marshal.SizeOf(songFile);
|
||||
|
||||
Reference in New Issue
Block a user