This commit is contained in:
SoulliesOfficial
2026-07-24 03:43:11 -04:00
parent 48e7364981
commit fe00ecfcc7
90 changed files with 9610 additions and 461 deletions

View File

@@ -35,6 +35,8 @@ namespace Ichni.UI
if (action == null)
{
Debug.LogError($"在InputActionAsset中未找到名为 '{actionName}' 的Action。");
inputActions.Enable();
waitingForInputCover.SetActive(false);
return;
}

View File

@@ -48,12 +48,20 @@ namespace Ichni.UI
this.title = title;
this.subTitle = subTitle;
titleText.gameObject.SetActive(true);
titleText.GetComponent<Localize>().SetTerm(title);
var titleLoc = titleText.GetComponent<Localize>();
if (titleLoc != null)
titleLoc.SetTerm(title);
else
titleText.text = title;
if (subTitle != "")
{
subTitleText.gameObject.SetActive(true);
subTitleText.GetComponent<Localize>().SetTerm(subTitle);
var subLoc = subTitleText.GetComponent<Localize>();
if (subLoc != null)
subLoc.SetTerm(subTitle);
else
subTitleText.text = subTitle;
}
else
{

View File

@@ -15,7 +15,15 @@ namespace Ichni.UI
{
base.SetUp(title, subTitle);
buttonText.GetComponent<Localize>().SetTerm(textContent);
var localize = buttonText.GetComponent<Localize>();
if (localize != null)
{
localize.SetTerm(textContent);
}
else
{
buttonText.text = textContent;
}
button.onClick.AddListener(() =>
{

View File

@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using Ichni.Diagnostics;
using Ichni.Menu;
using UnityEngine;
@@ -24,8 +25,11 @@ namespace Ichni.UI
languageDropdown.SetUp(gameSettings.languageIndex, MenuManager.instance.displayLanguageList, "Menu UI/Settings_Language");
languageDropdown.updateValueAction = () =>
{
BuildHangTracer.Log("UI_DROPDOWN", $"[Dropdown] 玩家选择语言索引: {languageDropdown.selectedIndex}");
gameSettings.languageIndex = languageDropdown.selectedIndex;
BuildHangTracer.Log("UI_DROPDOWN", "[Dropdown] 即将调用 SettingsManager.ApplyLanguageSettings()");
SettingsManager.instance.ApplyLanguageSettings();
BuildHangTracer.Log("UI_DROPDOWN", "[Dropdown] SettingsManager.ApplyLanguageSettings() 调用完成返回");
};
}

View File

@@ -45,12 +45,14 @@ namespace Ichni.Menu
public partial class RebindingWindow
{
private const string RebindsSaveKey = "Rebinds";
public void LoadBindings()
{
// 检查EasySave中是否存在存档
if (ES3.FileExists(rebindsFilePath))
if (ES3.FileExists(rebindsFilePath) && ES3.KeyExists(RebindsSaveKey, rebindsFilePath))
{
string rebindsJson = ES3.Load<string>("Rebinds", rebindsFilePath);
string rebindsJson = ES3.Load<string>(RebindsSaveKey, rebindsFilePath);
inputActions.LoadBindingOverridesFromJson(rebindsJson);
Debug.Log("键位已从EasySave加载。");
}
@@ -66,7 +68,7 @@ namespace Ichni.Menu
public void SaveBindings()
{
string rebindsJson = inputActions.SaveBindingOverridesAsJson();
ES3.Save("Rebinds", rebindsJson, rebindsFilePath);
ES3.Save(RebindsSaveKey, rebindsJson, rebindsFilePath);
Debug.Log("键位已保存到EasySave。");
}
}
@@ -79,10 +81,15 @@ namespace Ichni.Menu
// 移除所有覆盖即恢复到Asset文件中的原始设置
inputActions.RemoveAllBindingOverrides();
// 从EasySave中删除存档
if (ES3.KeyExists("Rebind", rebindsFilePath))
// 从EasySave中删除存档Key与文件
if (ES3.KeyExists(RebindsSaveKey, rebindsFilePath))
{
ES3.DeleteKey("Rebind", rebindsFilePath);
ES3.DeleteKey(RebindsSaveKey, rebindsFilePath);
}
if (ES3.FileExists(rebindsFilePath))
{
ES3.DeleteFile(rebindsFilePath);
}
Debug.Log("所有键位已重置为默认值。");

View File

@@ -1,9 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using SLSUtilities.WwiseAssistance;
using UniRx;
using UnityEngine;
using UnityEngine.UI;
@@ -51,12 +48,8 @@ namespace Ichni.Menu
selectedTab.RefreshUnlockState();
if (MenuManager.instance.isEnteringGame)
{
if (!MenuManager.instance.TryReserveGameEntry())
return;
}
MenuManager.instance.isEnteringGame = true;
InformationTransistor.instance.SetInformation(
ChapterSelectionManager.instance.currentChapter,
@@ -77,10 +70,7 @@ namespace Ichni.Menu
arrowSeq.OnComplete(() =>
{
MenuManager.instance.transitionUIPage.FadeIn();
Observable.Timer(TimeSpan.FromSeconds(0.6f)).Subscribe(_ =>
{
MenuManager.instance.EnterGame();
});
MenuManager.instance.ScheduleCurrentGameSceneLoad();
});
arrowSeq.Play();

View File

@@ -1,11 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Sirenix.OdinInspector;
using SLSUtilities.WwiseAssistance;
using TMPro;
using UniRx;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
@@ -62,12 +59,8 @@ namespace Ichni.Menu
return;
}
if (MenuManager.instance.isEnteringGame)
{
if (!MenuManager.instance.TryReserveGameEntry())
return;
}
MenuManager.instance.isEnteringGame = true;
InformationTransistor.instance.SetInformation(
ChapterSelectionManager.instance.currentChapter,
@@ -78,11 +71,7 @@ namespace Ichni.Menu
SongSelectionManager.instance.StopPreviewSong();
MenuManager.instance.transitionUIPage.FadeIn();
Observable.Timer(TimeSpan.FromSeconds(0.6f)).Subscribe(_ =>
{
MenuManager.instance.EnterGame();
});
MenuManager.instance.ScheduleCurrentGameSceneLoad();
}
else
{