local UITownMiddleRemind = UIViewClass() --prefab是UIFightThroneRemind function UITownMiddleRemind:OnOpened(context) UTL.String.SetLabelContent(self.lab_Tips, context.content) if context.btn1Content then self.btn_01:SetText(context.btn1Content) end if context.btn2Content then self.btn_02:SetText(context.btn2Content) end self:SetPushStyle(LuaConst.PushStyleEnum.CLOSENOTRECOVER) end function UITownMiddleRemind:OnButtonClicked(comp) if comp == self.btn_01 then if self.context.clickBtn1Func then self.context.clickBtn1Func() end self:CloseView() elseif comp == self.btn_02 then if self.context.clickBtn2Func then self.context.clickBtn2Func() end self:CloseView() end end return UITownMiddleRemind