using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; namespace MuHua { /// /// 滚动列表 - 垂直 /// public class UIScrollViewListV : UIScrollViewV where T : ModuleUIItem { public ModuleUIItems Items;// UI项容器 public UIScrollViewListV(VisualElement element, VisualElement canvas, VisualTreeAsset templateAsset, Func generate, UIDirection direction = UIDirection.FromTopToBottom) : base(element, canvas, direction) { Items = new ModuleUIItems(Container, templateAsset, generate); } public override void Dispose() { base.Dispose(); Items.Dispose(); } /// 释放资源 public void Release() => Items.Dispose(); /// 创建UI项 public void Create(List datas) => Items.Create(datas); /// 创建UI项 public void Create(Data data) => Items.Create(data); } }