修了不少东西

This commit is contained in:
2026-07-16 23:04:59 +08:00
parent 29972d0705
commit 73fe474cc6
134 changed files with 7673 additions and 741 deletions
+29 -2
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Bansonic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
@@ -11,6 +12,8 @@ using UnityEditor;
public class UI_Idols : MonoBehaviour
{
private const string MemorySystemComingSoonMessage = "\"记忆\"系统即将上线,敬请期待!";
[Header("quit")]
public Button quitButton;
@@ -265,13 +268,20 @@ public class UI_Idols : MonoBehaviour
if (isOn)
{
if (source == idolWeaponToggle)
{
ShowMemorySystemComingSoon();
ApplySectionSelection(GetFirstAvailableUnlockedToggle());
return;
}
ApplySectionSelection(source);
return;
}
if (!AnySectionToggleOn())
{
ApplySectionSelection(idolLevelsToggle != null ? idolLevelsToggle : GetFirstAvailableToggle());
ApplySectionSelection(GetFirstAvailableUnlockedToggle());
}
else
{
@@ -281,7 +291,9 @@ public class UI_Idols : MonoBehaviour
private void ApplySectionSelection(Toggle activeToggle)
{
Toggle resolved = activeToggle != null ? activeToggle : (idolLevelsToggle != null ? idolLevelsToggle : GetFirstAvailableToggle());
Toggle resolved = activeToggle != null && activeToggle != idolWeaponToggle
? activeToggle
: GetFirstAvailableUnlockedToggle();
suppressToggleCallbacks = true;
SetToggleState(idolLevelsToggle, resolved == idolLevelsToggle);
@@ -326,6 +338,21 @@ public class UI_Idols : MonoBehaviour
return null;
}
private Toggle GetFirstAvailableUnlockedToggle()
{
if (idolLevelsToggle != null) return idolLevelsToggle;
if (idolVoicesToggle != null) return idolVoicesToggle;
if (idolDetailPassageToggle != null) return idolDetailPassageToggle;
if (idolSkillsToggle != null) return idolSkillsToggle;
if (idolSkinsToggle != null) return idolSkinsToggle;
return null;
}
private static void ShowMemorySystemComingSoon()
{
gNotice.error.display(MemorySystemComingSoonMessage);
}
private static void SetToggleState(Toggle toggle, bool isOn)
{
if (toggle == null)