local UIRebornHint = UIViewClass() function UIRebornHint:OnOpened(context) UIUtils.SetLabelText(self.UICommonPopShowView.TextBtn1, Const_IDS.IDS_BUTTON_CONFIRM) UIUtils.SetLabelText(self.UICommonPopShowView.lab_Title, Const_IDS.IDS_EquipMelting_MeltingHint_5) UIUtils.SetLabelText(self.UICommonPopShowView.TextBtn2, Const_IDS.IDS_BUTTON_CANCEL) self:InitRareEquips(context.rareEquipIdList) self.confirmIdDict = context.ConfirmIdDict end function UIRebornHint:OnButtonClicked(comp) if comp == self.UICommonPopShowView.btn_1 then MDL.Reborn.SmeltReq(self.confirmIdDict, MDL.Reborn.SmeltType.Equip) self:CloseView() elseif comp == self.UICommonPopShowView.btn_2 then self:CloseView() end end function UIRebornHint:InitRareEquips(equipIdList) if self.loop_RareEquips.Count > 0 then self.loop_RareEquips:ClearCells() end for i, v in ipairs(equipIdList) do self.loop_RareEquips:AddData(v, 0) end self.loop_RareEquips:MoveIndex(0) end function UIRebornHint:OnCellInit(scrollRect, index, cellTable, data) if scrollRect == self.loop_RareEquips then UTL.Item.ItemSquareIcon(cellTable.img_Item, cellTable.sprite_Rank, data.ItemData.ID) end end function UIRebornHint:OnCellClicked(scrollRect, index, cellTable, target, data) if scrollRect == self.loop_RareEquips then if target == cellTable.event_Click then UIManager.OpenView(Const_UI_Lua.UIEnum.UICommonEquipTips, {equipInfo = data}) end end end return UIRebornHint