|
@@ -60,7 +60,7 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_list.itemRenderer = ListItemRenderer;
|
|
|
_ui.m_list.SetVirtual();
|
|
|
- _ui.m_list.scrollPane.onScrollEnd.Add(UpdateSuitView);
|
|
|
+ //_ui.m_list.scrollPane.onScrollEnd.Add(UpdateSuitView);
|
|
|
_ui.m_list.scrollPane.decelerationRate = 0.8f;
|
|
|
|
|
|
_ui.m_btnLeft.onClick.Add(OnBtnLeftClick);
|
|
@@ -78,10 +78,11 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnShown();
|
|
|
|
|
|
+
|
|
|
+ _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bg_fhl");
|
|
|
//_curSelectIndex = Math.Max(0, RoleDataManager.vipLv - 1);
|
|
|
//_ui.m_list.selectedIndex = _curSelectIndex;
|
|
|
//_ui.m_list.ScrollToView(_curSelectIndex);
|
|
|
-
|
|
|
//_activityId = 501;
|
|
|
_activityId = (int)(this.viewData as object[])[0];
|
|
|
_rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(_activityId);
|
|
@@ -89,6 +90,10 @@ namespace GFGGame
|
|
|
//UpdateRedDot();
|
|
|
|
|
|
RefreshList();
|
|
|
+
|
|
|
+ string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[0].suitId).name;
|
|
|
+ _ui.m_packageName.text = name;
|
|
|
+
|
|
|
_ui.m_btnLeft.visible = _curSelectIndex == 0 ? false : true;
|
|
|
_ui.m_btnRight.visible = _curSelectIndex < _ui.m_list.numItems - 1 ? true : false;
|
|
|
|
|
@@ -127,7 +132,17 @@ namespace GFGGame
|
|
|
item.m_txtName2.text = name.Length > 2 ? name.Substring(2, 1) : "";
|
|
|
item.m_txtName3.text = name.Length > 3 ? name.Substring(3, 1) : "";
|
|
|
item.m_txtName4.text = name.Length > 4 ? name.Substring(4) : "";
|
|
|
- _ui.m_packageName.text = name;
|
|
|
+ if (vipCfg.res != "")
|
|
|
+ {
|
|
|
+ item.m_cardIcon.visible = true;
|
|
|
+ item.m_cardBg.visible = true;
|
|
|
+ item.m_cardIcon.url = "ui://DailyWelfare/" + vipCfg.res;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ item.m_cardIcon.visible = false;
|
|
|
+ item.m_cardBg.visible = false;
|
|
|
+ }
|
|
|
if (item.m_listGiftBag.data == null)
|
|
|
{
|
|
|
item.m_listGiftBag.itemRenderer = ListRewardItemRender;
|
|
@@ -211,14 +226,20 @@ namespace GFGGame
|
|
|
|
|
|
if (_curSelectIndex == 0) return;
|
|
|
_curSelectIndex = _curSelectIndex - 1;
|
|
|
- _ui.m_list.ScrollToView(_curSelectIndex, true);
|
|
|
+ _ui.m_list.ScrollToView(_curSelectIndex);
|
|
|
+ string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[_curSelectIndex].suitId).name;
|
|
|
+ _ui.m_packageName.text = name;
|
|
|
+ UpdateSuitView();
|
|
|
//UpdateRedDot();
|
|
|
}
|
|
|
private void OnBtnRightClick()
|
|
|
{
|
|
|
if (_curSelectIndex == _ui.m_list.numItems - 1) return;
|
|
|
_curSelectIndex = _curSelectIndex + 1;
|
|
|
- _ui.m_list.ScrollToView(_curSelectIndex, true);
|
|
|
+ _ui.m_list.ScrollToView(_curSelectIndex);
|
|
|
+ string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[_curSelectIndex].suitId).name;
|
|
|
+ _ui.m_packageName.text = name;
|
|
|
+ UpdateSuitView();
|
|
|
//UpdateRedDot();
|
|
|
|
|
|
}
|