local UIBaseOptionalPopup = require "View/Common/UIBaseOptionalPopup" local UIGodBeastActivityOptionalPopup = UIViewClass(UIBaseOptionalPopup) function UIGodBeastActivityOptionalPopup:SetInfo() UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_OptionalHorseAndTreasure_Title19) local leftData = DataSheetManager.GodBeastData:GetDataByID(self.context.leftID) local rightData = DataSheetManager.GodBeastData:GetDataByID(self.context.rightID) self.state_Info:SetState(1) self:SetGodBeastInfo(self.group_LeftOther, leftData) self:SetGodBeastInfo(self.group_RightOther, rightData) UIUtils.SetLabel(self.txt_info, string.FormatByIdsId(Const_IDS.IDS_OptionalHorseAndTreasure_Title18, UTL.Color.FormatQualityText(UIUtils.GetLocalizedTxt(Const_IDS[leftData.GodBeastName]), leftData.GodBeastQuality), UTL.Color.FormatQualityText(UIUtils.GetLocalizedTxt(Const_IDS[rightData.GodBeastName]), rightData.GodBeastQuality))) end function UIGodBeastActivityOptionalPopup:SetGodBeastInfo(cellTable, data) UTL.Item.SetItemCell(cellTable.group_Info, data.PieceItem) cellTable.txt_Name = UIUtils.GetLocalizedTxt(Const_IDS[data.GodBeastName]) end function UIGodBeastActivityOptionalPopup:OnButtonClicked(comp) if self.btn_Confirm == comp then MDL.GodBeastActivity.ChooseRewardBeastReq(self.activityId, self.context.rightID) self:CloseView() else UIBaseOptionalPopup.OnButtonClicked(self, comp) end end return UIGodBeastActivityOptionalPopup