|
@@ -42,20 +42,20 @@ namespace GFGGame
|
|
|
protected override void AddEventListener()
|
|
|
{
|
|
|
base.AddEventListener();
|
|
|
- EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateVipProgressCom);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateView);
|
|
|
|
|
|
}
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
|
_shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_CHARGE, ConstStoreSubId.STORE_CHARGE);
|
|
|
- _ui.m_list.numItems = _shopCfgs.Count;
|
|
|
_valueBarController.OnShown();
|
|
|
- UpdateVipProgressCom();
|
|
|
+ UpdateView();
|
|
|
}
|
|
|
|
|
|
- private void UpdateVipProgressCom()
|
|
|
+ private void UpdateView()
|
|
|
{
|
|
|
+ _ui.m_list.numItems = _shopCfgs.Count;
|
|
|
ShopViewManager.Instance.UpdateVipProgressCom(_ui.m_comVipLv.target);
|
|
|
}
|
|
|
protected override void OnHide()
|
|
@@ -66,7 +66,7 @@ namespace GFGGame
|
|
|
protected override void RemoveEventListener()
|
|
|
{
|
|
|
base.RemoveEventListener();
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateVipProgressCom);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateView);
|
|
|
}
|
|
|
|
|
|
private void ListItemRenderer(int index, GObject obj)
|
|
@@ -83,7 +83,7 @@ namespace GFGGame
|
|
|
item.m_txtName.text = string.Format("{0}{1}", shopCfg.itemNum, shopCfg.itemName);
|
|
|
item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", shopCfg.itemNum, shopCfg.itemName);
|
|
|
bool isDouble = ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.doubleTimes;
|
|
|
- item.m_imgDouble.visible = isDouble;
|
|
|
+ item.m_grpDouble.visible = isDouble;
|
|
|
item.m_txtDesc.visible = isDouble;
|
|
|
item.m_icon.url = "ui://Store/sc_zizhuan_" + (index + 1);
|
|
|
|