feat: 开发模式

This commit is contained in:
2026-07-20 14:29:47 +08:00
parent cb255f8ca5
commit d10dfc1892
36 changed files with 19782 additions and 2667 deletions
@@ -0,0 +1,41 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace AibisDream.UI
{
public sealed class DeveloperModeListRow : MonoBehaviour
{
[SerializeField] private Button button;
[SerializeField] private TMP_Text label;
[SerializeField] private Image background;
public void Bind(string text, Action clicked, bool interactable, Color color, bool isError = false)
{
label.text = text ?? string.Empty;
label.color = color;
button.onClick.RemoveAllListeners();
if (clicked != null)
{
button.onClick.AddListener(() => clicked());
}
button.interactable = interactable;
if (background != null)
{
background.color = isError
? new Color(0.20f, 0.07f, 0.07f, 0.92f)
: new Color(0.08f, 0.12f, 0.16f, 0.92f);
}
gameObject.SetActive(true);
}
public void Hide()
{
button.onClick.RemoveAllListeners();
gameObject.SetActive(false);
}
}
}