|
@@ -40,14 +40,6 @@ namespace GFGGame
|
|
isfullScreen = true;
|
|
isfullScreen = true;
|
|
this.bringToFontOnClick = false;
|
|
this.bringToFontOnClick = false;
|
|
|
|
|
|
- // StoreTabCfg charge = StoreTabCfgArray.Instance.GetCfgByfunctionId(ConstFunctionId.STORE_CHARGE);
|
|
|
|
- // Debug.Log("charge[0]" + charge.subTabArr[0][0]);
|
|
|
|
- // Debug.Log("charge[0]" + charge.subTabArr[0][1]);
|
|
|
|
- // Debug.Log("charge[0]" + charge.subTabArr[0][2]);
|
|
|
|
- // Debug.Log("charge[1]" + charge.subTabArr[1][0]);
|
|
|
|
- // Debug.Log("charge[1]" + charge.subTabArr[1][1]);
|
|
|
|
- // Debug.Log("charge[1]" + charge.subTabArr[1][2]);
|
|
|
|
-
|
|
|
|
|
|
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("sc_beijing");
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("sc_beijing");
|
|
|
|
|
|
@@ -55,12 +47,12 @@ namespace GFGGame
|
|
_ui.m_comTab.m_c1.onChanged.Add(OnTabChange);
|
|
_ui.m_comTab.m_c1.onChanged.Add(OnTabChange);
|
|
_ui.m_listSubTab.itemRenderer = RenderListSubTabItem;
|
|
_ui.m_listSubTab.itemRenderer = RenderListSubTabItem;
|
|
_ui.m_listSubTab.onClickItem.Add(OnListSubTabClick);
|
|
_ui.m_listSubTab.onClickItem.Add(OnListSubTabClick);
|
|
- // _ui.m_listSubTab.selectionController.onChanged.Add(OnListSubTabClick);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
base.AddEventListener();
|
|
base.AddEventListener();
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
|
|
}
|
|
}
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
@@ -85,6 +77,8 @@ namespace GFGGame
|
|
_ui.m_listSubTab.ScrollToView(_curSubTabIndex);
|
|
_ui.m_listSubTab.ScrollToView(_curSubTabIndex);
|
|
OnListSubTabChange(_curSubTabIndex);
|
|
OnListSubTabChange(_curSubTabIndex);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ UpdateRedDot();
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -97,6 +91,7 @@ namespace GFGGame
|
|
protected override void RemoveEventListener()
|
|
protected override void RemoveEventListener()
|
|
{
|
|
{
|
|
base.RemoveEventListener();
|
|
base.RemoveEventListener();
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
|
|
|
|
|
|
}
|
|
}
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
@@ -145,6 +140,7 @@ namespace GFGGame
|
|
_ui.m_listSubTab.selectedIndex = 0;
|
|
_ui.m_listSubTab.selectedIndex = 0;
|
|
_curSubTabIndex = 0;
|
|
_curSubTabIndex = 0;
|
|
OnListSubTabChange(_curSubTabIndex);
|
|
OnListSubTabChange(_curSubTabIndex);
|
|
|
|
+ UpdateRedDot();
|
|
}
|
|
}
|
|
private void RenderListSubTabItem(int index, GObject obj)
|
|
private void RenderListSubTabItem(int index, GObject obj)
|
|
{
|
|
{
|
|
@@ -162,10 +158,7 @@ namespace GFGGame
|
|
menu2 = int.Parse(_storeTabCfgs[index][1]);
|
|
menu2 = int.Parse(_storeTabCfgs[index][1]);
|
|
}
|
|
}
|
|
item.data = index;
|
|
item.data = index;
|
|
- if (menu2 == ConstStoreSubId.STORE_CHARGE_ADDUP)
|
|
|
|
- {
|
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn0.target, RedDotDataManager.Instance.GetChargeAddUpReward());
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
private void OnListSubTabClick(EventContext context)
|
|
private void OnListSubTabClick(EventContext context)
|
|
{
|
|
{
|
|
@@ -207,6 +200,8 @@ namespace GFGGame
|
|
private void UpdateRedDot()
|
|
private void UpdateRedDot()
|
|
{
|
|
{
|
|
RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn0.target, RedDotDataManager.Instance.GetChargeAddUpReward());
|
|
RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn0.target, RedDotDataManager.Instance.GetChargeAddUpReward());
|
|
|
|
+
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_listSubTab.GetChildAt(ConstStoreSubId.STORE_CHARGE_ADDUP).asCom, RedDotDataManager.Instance.GetChargeAddUpReward() && (_ui.m_comTab.m_c1.selectedIndex == ConstStoreSubId.STORE_CHARGE + 1));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|