diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs new file mode 100644 index 00000000..c30f5846 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs @@ -0,0 +1,62 @@ +using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class AuctionWrapContentGroup
+ {
+ public int rowLines
+ {
+ get
+ {
+ return this.m_itemWrapContent.widthDimension;
+ }
+ }
+
+ public int maxCount
+ {
+ get
+ {
+ return this.m_itemWrapContent.maxItemCount;
+ }
+ }
+
+ public bool Active
+ {
+ get
+ {
+ return this.m_active;
+ }
+ }
+
+ private IXUIScrollView m_itemScrollView;
+
+ private IXUIWrapContent m_itemWrapContent;
+
+ private Transform m_curTransform;
+
+ private bool m_active = false;
+
+ public void SetAuctionWrapContentTemp(Transform temp, WrapItemUpdateEventHandler handler)
+ {
+ this.m_curTransform = temp;
+ this.m_itemScrollView = (temp.gameObject.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_itemWrapContent = (temp.transform.Find("Table").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_itemWrapContent.RegisterItemUpdateEventHandler(handler);
+ }
+
+ public void SetWrapContentSize(int listSize)
+ {
+ listSize = ((listSize % 2 == 1) ? (listSize + 1) : listSize);
+ this.m_itemWrapContent.SetContentCount(listSize, false);
+ this.m_itemScrollView.ResetPosition();
+ }
+
+ public void SetVisible(bool active)
+ {
+ this.m_active = active;
+ this.m_curTransform.gameObject.SetActive(active);
+ }
+ }
+}
|