|
@@ -1,4 +1,4 @@
|
|
|
-using UI.RechargeStore;
|
|
|
+using UI.Store;
|
|
|
using UI.CommonGame;
|
|
|
using FairyGUI;
|
|
|
using System.Collections.Generic;
|
|
@@ -40,34 +40,10 @@ namespace GFGGame
|
|
|
_ui = UI_StoreUI.Create();
|
|
|
this.viewCom = _ui.target;
|
|
|
isfullScreen = true;
|
|
|
-
|
|
|
- // _tabDic[0] = _subTabChargeDic;
|
|
|
- // _tabDic[1] = _subTabGiftBagDic;
|
|
|
- // _tabDic[2] = _subTabMonthCardDic;
|
|
|
- // _tabDic[3] = _subTabExchangeDic;
|
|
|
- // _tabDic[4] = _subTabArenaDic;
|
|
|
-
|
|
|
-
|
|
|
- // _subTabChargeDic[0] = new List<object>() { "充值", "累计充值" };//充值
|
|
|
- // _subTabGiftBagDic[0] = new List<object>() { "活动", "限时", "精选", "热销" };//礼包
|
|
|
- // _subTabMonthCardDic[0] = new List<object>() { "金卡", "黑金卡" };//月卡
|
|
|
- // _subTabExchangeDic[0] = new List<object>() { "画廊商城" };//兑换
|
|
|
- // _subTabArenaDic[0] = new List<object>();//竞技场
|
|
|
-
|
|
|
- // _subTabChargeDic[1] = new List<object>() { "RechargeStoreView", "" };//充值
|
|
|
- // _subTabGiftBagDic[1] = new List<object>() { "GiftBagBuyView", "", "", "" };//礼包
|
|
|
- // _subTabMonthCardDic[1] = new List<object>() { "", "" };//月卡
|
|
|
- // _subTabExchangeDic[1] = new List<object>() { "ItemExchangeView", "" };//兑换
|
|
|
- // _subTabArenaDic[1] = new List<object>();//竞技场
|
|
|
-
|
|
|
- // _subTabChargeDic[2] = new List<object>() { null, null };//充值
|
|
|
- // _subTabGiftBagDic[2] = new List<object>() { null, null, null, null };//礼包
|
|
|
- // _subTabMonthCardDic[2] = new List<object>() { null, null };//月卡
|
|
|
- // _subTabExchangeDic[2] = new List<object>() { null, null };//兑换
|
|
|
- // _subTabArenaDic[2] = new List<object>();//竞技场
|
|
|
+ this.bringToFontOnClick = false;
|
|
|
|
|
|
StoreTabCfg arenaTab = StoreTabCfgArray.Instance.GetCfgByfunctionId(ConstFunctionId.STORE_ARENA);
|
|
|
- _arenaSubTab.Add(new List<string>() { arenaTab.subTabArr[0][0], arenaTab.subTabArr[0].Length > 2 ? arenaTab.subTabArr[0][1] : "" });
|
|
|
+ _arenaSubTab.Add(new List<string>() { arenaTab.subTabArr[0][0], arenaTab.subTabArr[0][1] });
|
|
|
for (int i = ArenaDataManager.Instance.SeasonId; i > 0; i--)
|
|
|
{
|
|
|
_arenaSubTab.Add(new List<string>() { string.Format("第{0}赛季", i), "" });
|
|
@@ -80,6 +56,7 @@ namespace GFGGame
|
|
|
_ui.m_comTab.m_c1.onChanged.Add(OnTabChange);
|
|
|
_ui.m_listSubTab.itemRenderer = RenderListSubTabItem;
|
|
|
_ui.m_listSubTab.onClickItem.Add(OnListSubTabClick);
|
|
|
+ // _ui.m_listSubTab.selectionController.onChanged.Add(OnListSubTabClick);
|
|
|
|
|
|
}
|
|
|
protected override void AddEventListener()
|
|
@@ -96,14 +73,14 @@ namespace GFGGame
|
|
|
StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfgByfunctionId(functionId);
|
|
|
_curTabIndex = tabCfg == null ? 1 : tabCfg.index;
|
|
|
_ui.m_comTab.m_c1.selectedIndex = _curTabIndex;
|
|
|
- _ui.m_comTab.target.scrollPane.SetPercX((float)_curTabIndex / (float)StoreTabCfgArray.Instance.dataArray.Length, false);
|
|
|
+ _ui.m_comTab.target.scrollPane.SetPercX((float)(_curTabIndex - 1) / (float)StoreTabCfgArray.Instance.dataArray.Length, false);
|
|
|
|
|
|
_curSubTabIndex = this.viewData == null ? 0 : (int)(this.viewData as object[])[1];
|
|
|
-
|
|
|
if (_ui.m_listSubTab.numItems > _curSubTabIndex)
|
|
|
{
|
|
|
_ui.m_listSubTab.selectedIndex = _curSubTabIndex;
|
|
|
_ui.m_listSubTab.ScrollToView(_curSubTabIndex);
|
|
|
+ OnListSubTabChange(_curSubTabIndex);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -122,7 +99,8 @@ namespace GFGGame
|
|
|
}
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
- this.Hide();
|
|
|
+ ViewManager.Hide(_curViewName);
|
|
|
+ ViewManager.GoBackFrom(typeof(StoreView).FullName);
|
|
|
}
|
|
|
|
|
|
private void OnTabChange()
|
|
@@ -144,6 +122,7 @@ namespace GFGGame
|
|
|
}
|
|
|
_ui.m_listSubTab.selectedIndex = 0;
|
|
|
_curSubTabIndex = 0;
|
|
|
+ OnListSubTabChange(_curSubTabIndex);
|
|
|
}
|
|
|
private void RenderListSubTabItem(int index, GObject obj)
|
|
|
{
|
|
@@ -163,21 +142,26 @@ namespace GFGGame
|
|
|
{
|
|
|
GObject obj = context.data as GObject;
|
|
|
int index = (int)obj.data;
|
|
|
+ if (index < 0) return;
|
|
|
+ }
|
|
|
+ private void OnListSubTabChange(int index)
|
|
|
+ {
|
|
|
+
|
|
|
StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfg(_curTabIndex);
|
|
|
|
|
|
- string viewName = tabCfg.subTabArr[index].Length > 2 ? tabCfg.subTabArr[index][1] : "";
|
|
|
+ string viewName = tabCfg.subTabArr[index][1];
|
|
|
if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName))
|
|
|
{
|
|
|
_ui.m_listSubTab.selectedIndex = _curSubTabIndex;
|
|
|
return;
|
|
|
}
|
|
|
- ViewManager.Hide("GFGGame." + _curViewName);
|
|
|
+ ViewManager.Hide(_curViewName);
|
|
|
if (!string.IsNullOrEmpty(viewName))
|
|
|
{
|
|
|
ViewManager.Show("GFGGame." + viewName, index);
|
|
|
}
|
|
|
_curSubTabIndex = index;
|
|
|
- _curViewName = viewName;
|
|
|
+ _curViewName = "GFGGame." + viewName;
|
|
|
|
|
|
}
|
|
|
private void UpdateRedDot()
|