将可配置参数开放到界面上。

This commit is contained in:
2026-08-04 08:58:06 +08:00
parent 1b9778abe6
commit e04b717390
8 changed files with 96 additions and 32 deletions
@@ -49,13 +49,14 @@ namespace XericUI.XTable.Rendering.Elements
#region 构造函数与析构
public CellAssembler(Transform parent, string defaultStyleNamespace = null)
public CellAssembler(Transform parent, string defaultStyleNamespace = null, int textPoolMaxCapacity = 256,
int imagePoolMaxCapacity = 256)
{
m_Parent = parent;
m_DefaultStyleNamespace = defaultStyleNamespace;
m_ImagePool = new SlotCounterPool<PooledImage>(() => CreateImage("cell_img"),
m_ImagePool = new SlotCounterPool<PooledImage>(() => CreateImage("cell_img"), imagePoolMaxCapacity,
SetImageCounterActive, SetImageCounterInactive);
m_TextPool = new SlotCounterPool<PooledText>(() => CreateText("cell_text"),
m_TextPool = new SlotCounterPool<PooledText>(() => CreateText("cell_text"), textPoolMaxCapacity,
SetTextCounterActive, SetTextCounterInactive);
}