|
@@ -32,7 +32,7 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
|
_ui.m_btnHome.onClick.Add(OnClickBtnHome);
|
|
|
- _ui.m_listChapter.onClickItem.Add(OnClickListChapterItem);
|
|
|
+ // _ui.m_listChapter.onClickItem.Add(OnClickListChapterItem);
|
|
|
_ui.m_listTab.onClickItem.Add(OnClickListTabItem);
|
|
|
_ui.m_listType.onClickItem.Add(OnClickListTypeItem);
|
|
|
|
|
@@ -77,7 +77,7 @@ namespace GFGGame
|
|
|
private void OnClickListChapterItem(EventContext context)
|
|
|
{
|
|
|
// GuideController.TryCompleteGuide(ConstGuideId.MAIN_UI_BTN_STORY);
|
|
|
- GObject chapterItem = context.data as GObject;
|
|
|
+ GObject chapterItem = context.sender as GObject;
|
|
|
int chapterID = (int)chapterItem.data;
|
|
|
StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterID);
|
|
|
if (MainStoryDataManager.CheckChapterUnlock(chapterID))
|
|
@@ -106,7 +106,12 @@ namespace GFGGame
|
|
|
listItem.m_content.m_txtLv.text = StoryUtil.GetChapterOrder(chapterCfg.id).ToString();
|
|
|
listItem.m_content.m_txtTitle.text = chapterCfg.name;
|
|
|
listItem.m_content.m_compPic.m_pic.url = "ui://Main/" + chapterCfg.res;
|
|
|
+ if (listItem.m_content.target.data == null)
|
|
|
+ {
|
|
|
+ listItem.m_content.target.onClick.Add(OnClickListChapterItem);
|
|
|
+ }
|
|
|
listItem.target.data = chapterCfg.id;
|
|
|
+ listItem.m_content.target.data = chapterCfg.id;
|
|
|
}
|
|
|
|
|
|
private void UpdateList()
|