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