|
@@ -65,6 +65,44 @@ namespace GFGGame
|
|
|
EventAgent.RemoveEventListener(ConstMessage.JUMP_TO_SOURCE, this.Hide);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 初始化上方选择菜单,同步按钮按下和普通状态的文本
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="index"></param>
|
|
|
+ /// <param name="item"></param>
|
|
|
+ private void RenderListSuitType(int index, GObject item)
|
|
|
+ {
|
|
|
+ UI_Button6 button6 = UI_Button6.Proxy(item);
|
|
|
+ button6.m_title1.text = button6.target.title;
|
|
|
+ UI_Button6.ProxyEnd();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickListSuitType(EventContext eventContext)
|
|
|
+ {
|
|
|
+ UpdateItemsByType(_ui.m_c1.selectedIndex + 1);
|
|
|
+ Timers.inst.StartCoroutine(UpdateRedDot());
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 更新选择菜单的红点
|
|
|
+ /// </summary>
|
|
|
+ private void UpdateListSuitTypeRedDots()
|
|
|
+ {
|
|
|
+ for (int j = 0; j < _ui.m_suitTypeList.numItems; j++)
|
|
|
+ {
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_suitTypeList.GetChildAt(j).asCom, false);
|
|
|
+ for (int i = 0; i < _menuTypeAllDataDic[j + 1].Count; i++)
|
|
|
+ {
|
|
|
+ bool red = RedDotDataManager.Instance.GetSuitGuideRed(_menuTypeAllDataDic[j + 1][i]);
|
|
|
+ if (red)
|
|
|
+ {
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_suitTypeList.GetChildAt(j).asCom, red, "", -65, 16);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void UpdateItemsByType(int type)
|
|
|
{
|
|
|
_ui.m_c1.SetSelectedIndex(type - 1);
|
|
@@ -124,28 +162,8 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 初始化种类2
|
|
|
+ /// 由于type1页面未使用列表,所以需要循环更新进度
|
|
|
/// </summary>
|
|
|
- /// <param name="index"></param>
|
|
|
- /// <param name="gObject"></param>
|
|
|
- private void RenderListSuitType2Item(int index, GObject gObject)
|
|
|
- {
|
|
|
- UI_SuitStoryItem item = UI_SuitStoryItem.Proxy(gObject);
|
|
|
- SuitGuideMenuCfg cfg = SuitGuideMenuCfgArray.Instance.GetCfg(_menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index]);
|
|
|
- item.m_title.text = cfg.name;
|
|
|
- int haveCount = SuitUtil.GetSuitIdList(false, true, _menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index], 0).Count;
|
|
|
- int totalCount = SuitUtil.GetSuitIdList(true, true, _menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index], 0).Count;
|
|
|
- item.m_progressNum.SetVar("value", haveCount.ToString()).SetVar("max", totalCount.ToString()).FlushVars();
|
|
|
- UI_SuitStoryItem.ProxyEnd();
|
|
|
- }
|
|
|
-
|
|
|
- private void OnClickListSuitType2Item(EventContext eventContext)
|
|
|
- {
|
|
|
- GObject obj = eventContext.data as GObject;
|
|
|
- int index = _ui.m_suitType2Items.GetChildIndex(obj);
|
|
|
- ViewManager.Show<SuitGuideDetailView>(_menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index], new object[] { ViewName.SUIT_GUIDE_VIEW, this.viewData });
|
|
|
- }
|
|
|
-
|
|
|
private void UpdateType1Progress()
|
|
|
{
|
|
|
for (int i = 0; i < _suitTypeItems.Count; i++)
|
|
@@ -161,41 +179,26 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 初始化上方选择菜单,同步按钮按下和普通状态的文本
|
|
|
+ /// 初始化种类2
|
|
|
/// </summary>
|
|
|
/// <param name="index"></param>
|
|
|
- /// <param name="item"></param>
|
|
|
- private void RenderListSuitType(int index, GObject item)
|
|
|
- {
|
|
|
- UI_Button6 button6 = UI_Button6.Proxy(item);
|
|
|
- button6.m_title1.text = button6.target.title;
|
|
|
- UI_Button6.ProxyEnd();
|
|
|
- }
|
|
|
-
|
|
|
- private void OnClickListSuitType(EventContext eventContext)
|
|
|
+ /// <param name="gObject"></param>
|
|
|
+ private void RenderListSuitType2Item(int index, GObject gObject)
|
|
|
{
|
|
|
- UpdateItemsByType(_ui.m_c1.selectedIndex + 1);
|
|
|
- Timers.inst.StartCoroutine(UpdateRedDot());
|
|
|
+ UI_SuitStoryItem item = UI_SuitStoryItem.Proxy(gObject);
|
|
|
+ SuitGuideMenuCfg cfg = SuitGuideMenuCfgArray.Instance.GetCfg(_menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index]);
|
|
|
+ item.m_title.text = cfg.name;
|
|
|
+ int haveCount = SuitUtil.GetSuitIdList(false, true, _menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index], 0).Count;
|
|
|
+ int totalCount = SuitUtil.GetSuitIdList(true, true, _menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index], 0).Count;
|
|
|
+ item.m_progressNum.SetVar("value", haveCount.ToString()).SetVar("max", totalCount.ToString()).FlushVars();
|
|
|
+ UI_SuitStoryItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 更新选择菜单的红点
|
|
|
- /// </summary>
|
|
|
- private void UpdateListSuitTypeRedDots()
|
|
|
+ private void OnClickListSuitType2Item(EventContext eventContext)
|
|
|
{
|
|
|
- for (int j = 0; j < _ui.m_suitTypeList.numItems; j++)
|
|
|
- {
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_suitTypeList.GetChildAt(j).asCom, false);
|
|
|
- for (int i = 0; i < _menuTypeAllDataDic[j + 1].Count; i++)
|
|
|
- {
|
|
|
- bool red = RedDotDataManager.Instance.GetSuitGuideRed(_menuTypeAllDataDic[j + 1][i]);
|
|
|
- if (red)
|
|
|
- {
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_suitTypeList.GetChildAt(j).asCom, red, "", -65, 16);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ GObject obj = eventContext.data as GObject;
|
|
|
+ int index = _ui.m_suitType2Items.GetChildIndex(obj);
|
|
|
+ ViewManager.Show<SuitGuideDetailView>(_menuTypeAllDataDic[_ui.m_c1.selectedIndex + 1][index], new object[] { ViewName.SUIT_GUIDE_VIEW, this.viewData });
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnBack()
|