修复BUG
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace MuHua {
|
||||
/// <summary>
|
||||
/// 滚动列表 - 水平
|
||||
/// </summary>
|
||||
public class UIScrollViewListH<T, Data> : UIScrollViewH where T : ModuleUIItem<Data> {
|
||||
|
||||
private ModuleUIItems<T, Data> Items;// UI项容器
|
||||
|
||||
public UIScrollViewListH(VisualElement element, VisualElement canvas, VisualTreeAsset templateAsset, Func<Data, VisualElement, T> generate) : base(element, canvas) {
|
||||
Items = new ModuleUIItems<T, Data>(Container, templateAsset, generate);
|
||||
}
|
||||
/// <summary> 释放资源 </summary>
|
||||
public override void Dispose() {
|
||||
base.Dispose();
|
||||
Items.Dispose();
|
||||
}
|
||||
/// <summary> 创建UI项 </summary>
|
||||
public void Create(List<Data> datas) => Items.Create(datas);
|
||||
/// <summary> 创建UI项 </summary>
|
||||
public void Create(Data data) => Items.Create(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user