local UIGuildAlliesAlignTips = UIViewClass() ------------------------- 系统函数 -------------------------------- function UIGuildAlliesAlignTips:OnOpened(context) if context then local guildAlliesData = DataSheetManager.GuildAlliesData:GetDataByID(context.powerID) local content = string.FormatByIdsId(Const_IDS[context.params.ResultInfo], UIUtils.GetLocalizedTxt(Const_IDS[guildAlliesData.AlliesName])) if context.isGoodResult then UIUtils.SetLabel(self.txt_TextContent01, content) self.result_State:SetState(1) if context.allyIndex ~= 0 then local stateAttrTable = guildAlliesData.State_Table[context.allyIndex] if stateAttrTable then CTL.GuildAllies.SetTextBuff(stateAttrTable.StateAttr, self.img_AtkAttr, self.lab_ATk, self.txt_ATk, self.img_CritAttr, self.lab_Crit, self.txt_Crit) end end else self.result_State:SetState(0) UIUtils.SetLabel(self.txt_TextContent, content) end end end function UIGuildAlliesAlignTips:OnButtonClicked(comp) if comp == self.btn_Bottom then self:CloseView() end end ------------------------------------------------------------------- return UIGuildAlliesAlignTips