local AttrNodeCell = class("AttrNodeCell", BaseCell) local ATTR_CELL = "app/ui/hero/cell/attr_cell" local ATTR_CELL_PATH = "assets/prefabs/ui/hero/cell/attr_cell.prefab" function AttrNodeCell:init() local uiMap = self:getUIMap() self.txTitle = uiMap["total_node.tx_title"] self.itemsRoot = uiMap["total_node.items"] end function AttrNodeCell:refresh(heroId, node) if node == GConst.HeroConst.ATTR_SHOW_TOTAL then self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_13)) elseif node == GConst.HeroConst.ATTR_SHOW_BASE then self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_14)) elseif node == GConst.HeroConst.ATTR_SHOW_WEAPON then self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_15)) elseif node == GConst.HeroConst.ATTR_SHOW_ARMOR then self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_16)) elseif node == GConst.HeroConst.ATTR_SHOW_SKIN then self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_17)) end for index, attr in ipairs(node) do CellManager:loadCellAsync(ATTR_CELL_PATH, ATTR_CELL, self.itemsRoot, function(cell) cell:refresh(heroId, node, attr) end) end end return AttrNodeCell