From 02e13cfa81063db800cad02c8ba8932bfba2e6fe Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 28 五月 2026 19:33:34 +0800
Subject: [PATCH] 666 新增代金券 修复商城货币框代币显示问题
---
Main/System/Scroll/ScrollerController.cs | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Main/System/Scroll/ScrollerController.cs b/Main/System/Scroll/ScrollerController.cs
index c9aab16..6e3db1d 100644
--- a/Main/System/Scroll/ScrollerController.cs
+++ b/Main/System/Scroll/ScrollerController.cs
@@ -13,8 +13,8 @@
LockVerticalTop,
LockVerticalBottom,
KeepHorizon,
- KeepVertical,
- KeepVertical2,
+ KeepVertical, //鍦ㄦ粴鍔ㄨ鍥惧唴瀹规洿鏂版垨鍒锋柊鏃�,淇濇寔褰撳墠浣嶇疆涓嶅彉 缃《鏄剧ず
+ KeepVertical2, //鍦ㄦ粴鍔ㄨ鍥惧唴瀹规洿鏂版垨鍒锋柊鏃�,淇濇寔褰撳墠浣嶇疆涓嶅彉 缃簳鏄剧ず
}
public class ScrollerController : MonoBehaviour, IEnhancedScrollerDelegate {
@@ -110,7 +110,7 @@
}
// 鑾峰彇鎬荤殑Cell鏁扮洰锛堝惈涓嶆樉绀虹殑锛�
- public int GetNumberOfCells()
+ public int GetCellTotalCount()
{
return _data.Count;
}
@@ -367,11 +367,13 @@
if (horizontal)
{
- rect.sizeDelta = rect.sizeDelta.SetX(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing));
+ rect.sizeDelta = rect.sizeDelta.SetX(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing +
+ m_Scorller.padding.right + m_Scorller.padding.left));
}
else if (vertical)
{
- rect.sizeDelta = rect.sizeDelta.SetY(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing));
+ rect.sizeDelta = rect.sizeDelta.SetY(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing +
+ m_Scorller.padding.top + m_Scorller.padding.bottom));
}
if (rect.sizeDelta.x < jiaMiddleWithMaxSize)
{
@@ -400,6 +402,7 @@
lastDataCnt = _data.Count;
}
+ //index 鏄寜addcell鐨勯『搴忥紝鍖呭惈鎵�鏈夊眰绾�
public void JumpIndex(int index)
{
if (!inited)
--
Gitblit v1.8.0