|
@@ -29,32 +29,49 @@ namespace GFGGame
|
|
this.modal = true;
|
|
this.modal = true;
|
|
viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
|
|
viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
|
|
|
|
|
|
- _ui.m_listStarReward.itemRenderer = RenderListStarRewardItem;
|
|
|
|
|
|
+ _ui.m_listReward.itemRenderer = RenderListStarRewardItem;
|
|
}
|
|
}
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
_viewData = this.viewData as CardData;
|
|
_viewData = this.viewData as CardData;
|
|
- _ui.m_listStarReward.numItems = CardStarCfgArray.Instance.GetCfgsBycardId(_viewData.itemCfg.id).Count;
|
|
|
|
|
|
+ _ui.m_listReward.numItems = CardStarCfgArray.Instance.GetCfgsBycardId(_viewData.itemCfg.id).Count;
|
|
}
|
|
}
|
|
private void RenderListStarRewardItem(int index, GObject obj)
|
|
private void RenderListStarRewardItem(int index, GObject obj)
|
|
{
|
|
{
|
|
|
|
+ UI_ListCardStarRewardItem item = UI_ListCardStarRewardItem.Proxy(obj);
|
|
CardStarCfg cardStoryCfg = CardStarCfgArray.Instance.GetCfgsBycardId(_viewData.itemCfg.id)[index];
|
|
CardStarCfg cardStoryCfg = CardStarCfgArray.Instance.GetCfgsBycardId(_viewData.itemCfg.id)[index];
|
|
- UI_ListCardStoryItem listItem = UI_ListCardStoryItem.Proxy(obj);
|
|
|
|
if (index == 0)
|
|
if (index == 0)
|
|
{
|
|
{
|
|
- listItem.m_txtTitle.text = "激活词牌";
|
|
|
|
|
|
+ item.m_txtTitle.text = "激活词牌";
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- listItem.m_txtTitle.text = string.Format("词牌星级达到{0}星", NumberUtil.GetChiniseNumberText(index + 1));
|
|
|
|
|
|
+ item.m_txtTitle.text = string.Format("词牌星级达到{0}星", NumberUtil.GetChiniseNumberText(index + 1));
|
|
}
|
|
}
|
|
|
|
+ RedDotController.Instance.SetComRedDot(item.m_btnGet, true);
|
|
|
|
+ if (item.m_btnGet.data == null)
|
|
|
|
+ {
|
|
|
|
+ item.m_btnGet.onClick.Add(OnClickBtnGet);
|
|
|
|
+ }
|
|
|
|
+ item.m_btnGet.data = index;
|
|
|
|
+
|
|
|
|
+ ItemData reward = ItemUtil.createItemData(cardStoryCfg.rewardsArr[0]);
|
|
|
|
+ if (item.m_comItem.data == null)
|
|
|
|
+ {
|
|
|
|
+ item.m_comItem.data = new ItemView(item.m_comItem);
|
|
|
|
+ }
|
|
|
|
+ (item.m_comItem.data as ItemView).SetData(reward);
|
|
|
|
+
|
|
|
|
|
|
- UI_ListCardStoryItem.ProxyEnd();
|
|
|
|
|
|
+
|
|
|
|
+ UI_ListCardStarRewardItem.ProxyEnd();
|
|
}
|
|
}
|
|
- private void OnClickBtnGo(CardStoryCfg cardStoryCfg)
|
|
|
|
|
|
+ private void OnClickBtnGet(EventContext context)
|
|
{
|
|
{
|
|
- StoryController.ShowCardStoryDialog(cardStoryCfg, _viewData);
|
|
|
|
|
|
+ GObject obj = context.sender as GObject;
|
|
|
|
+ int index = (int)obj.data;
|
|
|
|
+
|
|
}
|
|
}
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
{
|
|
{
|