|
@@ -41,17 +41,17 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void RenderListCardStoryItem(int index, GObject obj)
|
|
private void RenderListCardStoryItem(int index, GObject obj)
|
|
{
|
|
{
|
|
- CardStoryCfg cardStoryCfg = CardDataManager.GetStoryCfgsById(_viewData.itemCfg.id)[index];
|
|
|
|
UI_ListCardStoryItem listItem = UI_ListCardStoryItem.Proxy(obj);
|
|
UI_ListCardStoryItem listItem = UI_ListCardStoryItem.Proxy(obj);
|
|
|
|
+ CardStoryCfg cardStoryCfg = CardDataManager.GetStoryCfgsById(_viewData.itemCfg.id)[index];
|
|
listItem.m_txtTitle.text = string.Format("第{0}节", NumberUtil.GetChiniseNumberText(index + 1));// "第" + NumberUtil.GetChiniseNumberText(index + 1) + "节";
|
|
listItem.m_txtTitle.text = string.Format("第{0}节", NumberUtil.GetChiniseNumberText(index + 1));// "第" + NumberUtil.GetChiniseNumberText(index + 1) + "节";
|
|
if (_viewData.lv >= cardStoryCfg.lvl)
|
|
if (_viewData.lv >= cardStoryCfg.lvl)
|
|
{
|
|
{
|
|
listItem.m_c1.selectedIndex = 0;
|
|
listItem.m_c1.selectedIndex = 0;
|
|
if (listItem.target.data == null)
|
|
if (listItem.target.data == null)
|
|
{
|
|
{
|
|
- listItem.m_btnGo.onClick.Add(() => OnClickBtnGo(cardStoryCfg));
|
|
|
|
- listItem.target.data = cardStoryCfg.cardId;
|
|
|
|
|
|
+ listItem.m_btnGo.onClick.Add(OnClickBtnGo);
|
|
}
|
|
}
|
|
|
|
+ listItem.m_btnGo.data = cardStoryCfg;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -61,8 +61,13 @@ namespace GFGGame
|
|
}
|
|
}
|
|
UI_ListCardStoryItem.ProxyEnd();
|
|
UI_ListCardStoryItem.ProxyEnd();
|
|
}
|
|
}
|
|
- private void OnClickBtnGo(CardStoryCfg cardStoryCfg)
|
|
|
|
|
|
+ private void OnClickBtnGo(EventContext context)
|
|
{
|
|
{
|
|
|
|
+ var cardStoryCfg = ((GButton)context.sender).data as CardStoryCfg;
|
|
|
|
+ if(cardStoryCfg == null)
|
|
|
|
+ {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
StoryController.ShowCardStoryDialog(cardStoryCfg, _viewData);
|
|
StoryController.ShowCardStoryDialog(cardStoryCfg, _viewData);
|
|
}
|
|
}
|
|
private void OnClickBtnMood()
|
|
private void OnClickBtnMood()
|