重做物品系统

This commit is contained in:
MuHua-123
2025-10-11 17:02:18 +08:00
parent dd690d871c
commit 21b7cbcef5
145 changed files with 1177 additions and 2219 deletions
@@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using MuHua;
/// <summary>
/// 消息页面2
/// </summary>
public class UIMessage2 : ModuleUIPanel {
private Action callback;
public Label Content => Q<Label>("Content");
public Button Button => Q<Button>("Button");
public UIMessage2(VisualElement element) : base(element) {
Button.clicked += () => { callback?.Invoke(); Settings(false); };
}
public void Settings(bool active) {
element.EnableInClassList("document-page-hide", !active);
callback = null;
}
public void Settings(bool active, string value = "", Action callback = null) {
element.EnableInClassList("document-page-hide", !active);
Content.text = value;
this.callback = callback;
}
}