using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using UnityEngine.UIElements; /* 这个controller 是用于控制 Warehouse UI菜单的 */ public class WarehouseController : MonoBehaviour { // Start is called before the first frame update // 主页面元素 private Button foodButton, toyButton, otherButton, backButton; private List warehouseItems = new(); private VisualElement itemListView; //弹窗元素 private Button yesButton, noButton; private Label msgBody; private TextField qtyField; private VisualElement msgRoot, msgField; // 选中的产品 private string selectedItemId; private string currentTab; void OnEnable() { // 基层元素获取 var root = GetComponent().rootVisualElement; var mainManu = root.Q("mainManu"); itemListView = root.Q("itemListView"); foodButton = mainManu.Q