diff --git a/lua/app/ui/activity/activity_hero_comp.lua b/lua/app/ui/activity/activity_hero_comp.lua index 5cf50f75..241680c5 100644 --- a/lua/app/ui/activity/activity_hero_comp.lua +++ b/lua/app/ui/activity/activity_hero_comp.lua @@ -10,6 +10,7 @@ function ActivityHeroComp:init() self.txTime = uiMap["hero_panel.tx_time"] self.btnBuy = uiMap["hero_panel.btn_buy"] self.txBuy = uiMap["hero_panel.btn_buy.tx_buy"] + self.rewardNode = uiMap["hero_panel.rewards"] self.rewardCells = {} for i = 1, 3 do table.insert(self.rewardCells, uiMap["hero_panel.rewards.pop_reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) @@ -36,6 +37,7 @@ function ActivityHeroComp:refresh() cell:setVisible(false) end end + self.rewardNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout() if DataManager.ShopData:getGiftRemainBuyNum(GConst.ActivityConst.HERO_GIFT_ID_1) > 0 then self.btnBuy:setTouchEnable(true) self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2")