local UIBaseOptionalPopup = require "View/Common/UIBaseOptionalPopup" local UIMonopolyTreasureOptionalPopup = UIViewClass(UIBaseOptionalPopup) function UIMonopolyTreasureOptionalPopup:SetInfo() UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_OptionalHorseAndTreasure_Hint7) self:RegistSystemEvent(EventID.UI_Monopoly_ChooseTreasure, self.CloseView) local leftData = DataSheetManager.TreasureData:GetDataByTreasureID(self.context.leftID) local rightData = DataSheetManager.TreasureData:GetDataByTreasureID(self.context.rightID) self.state_Info:SetState(1) self:SetTreasureInfo(self.group_LeftOther, leftData) self:SetTreasureInfo(self.group_RightOther, rightData) UIUtils.SetLabel(self.txt_info, string.FormatByIdsId(Const_IDS.IDS_OptionalHorseAndTreasure_Hint5, UTL.Color.FormatQualityText(UIUtils.GetLocalizedTxt(Const_IDS[leftData.TreasureName]), leftData.TreasureQuality), UTL.Color.FormatQualityText(UIUtils.GetLocalizedTxt(Const_IDS[rightData.TreasureName]), rightData.TreasureQuality))) end function UIMonopolyTreasureOptionalPopup:SetTreasureInfo(cellTable, data) UTL.Item.SetItemCell(cellTable.group_Info, data.PieceItem) cellTable.txt_Name = UIUtils.GetLocalizedTxt(Const_IDS[data.TreasureName]) end function UIMonopolyTreasureOptionalPopup:OnButtonClicked(comp) if self.btn_Confirm == comp then MDL.Monopoly.ChooseRewardTreasureReq(self.activityId, self.context.rightID) else UIBaseOptionalPopup.OnButtonClicked(self, comp) end end return UIMonopolyTreasureOptionalPopup