|
@@ -38,7 +38,6 @@ namespace GFGGame
|
|
|
_valueBarController = new ValueBarController(_ui.m_comValueBar);
|
|
|
|
|
|
_ui.m_list.itemRenderer = RenderListItem;
|
|
|
- _ui.m_list.onClickItem.Add(OnListItemClick);
|
|
|
|
|
|
_ui.m_btnBack.onClick.Add(Hide);
|
|
|
_ui.m_btnChange.onClick.Add(OnBtnChangeClick);
|
|
@@ -124,6 +123,11 @@ namespace GFGGame
|
|
|
StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(storyFightCfg.bonusBaseArr[0][0]);
|
|
|
item.m_loaItem.url = ResPathUtil.GetIconPath(itemCfg);
|
|
|
+ if (item.m_loaItem.data == null)
|
|
|
+ {
|
|
|
+ item.m_loaItem.onClick.Add(OnLoaItemClick);
|
|
|
+ }
|
|
|
+ item.m_loaItem.data = index;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -131,17 +135,20 @@ namespace GFGGame
|
|
|
item.m_loaItem.visible = false;
|
|
|
item.m_loaIcon.visible = true;
|
|
|
item.m_loaIcon.url = string.Format("ui://Studio/{0}", _filingCfg.res);
|
|
|
-
|
|
|
}
|
|
|
item.m_grpLock.visible = index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id);
|
|
|
item.m_comFlower.m_c1.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(_storyLevelCfgs[index].id);
|
|
|
- item.target.data = index;// _storyLevelCfgs[_index];
|
|
|
+ if (item.m_loaBg.data == null)
|
|
|
+ {
|
|
|
+ item.m_loaBg.onClick.Add(OnListItemClick);
|
|
|
+ }
|
|
|
+ item.m_loaBg.data = index;
|
|
|
UI_ListLevelItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
private void OnListItemClick(EventContext context)
|
|
|
{
|
|
|
- GObject obj = context.data as GObject;
|
|
|
+ GObject obj = context.sender as GObject;
|
|
|
int index = (int)obj.data;
|
|
|
StoryLevelCfg storyLevelCfg = _storyLevelCfgs[index];
|
|
|
if (index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id))
|
|
@@ -151,14 +158,15 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
MainStoryDataManager.currentLevelCfgId = storyLevelCfg.id;
|
|
|
- // if (!string.IsNullOrEmpty(storyLevelCfg.storyStartID))
|
|
|
- // {
|
|
|
- // StoryController.ShowFilingStoryDialog(storyLevelCfg);
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
|
|
|
- // }
|
|
|
+ }
|
|
|
+ private void OnLoaItemClick(EventContext context)
|
|
|
+ {
|
|
|
+ GObject obj = context.sender as GObject;
|
|
|
+ int index = (int)obj.data;
|
|
|
+ StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(storyFightCfg.bonusBaseArr[0][0]);
|
|
|
+ GoodsItemTipsController.ShowItemTips(itemCfg.id);
|
|
|
}
|
|
|
private void OnBtnChangeClick()
|
|
|
{
|