local UIGuildBossBattleRank = UIViewClass() function UIGuildBossBattleRank:OnOpened(context) if #context.rollInfo > 0 then table.sort(context.rollInfo,function (a,b) if a.rollNum == b.rollNum and context.rollMaxNum == b.rollNum then if a.acid == context.ownerAcid then return true end return false else return a.rollNum > b.rollNum end end ) for i=1,5 do if context.rollInfo[i] then self.LoopScroll_GuildBossBattleRankDamage:AddData(context.rollInfo[i], 0) end end else self.section_Empty.gameObject:SetActive(true) end end function UIGuildBossBattleRank:OnButtonClicked(comp) if comp == self.btn_GuildEnhance then self:CloseView() end end function UIGuildBossBattleRank:OnCellInit(scrollRect, index, cellTable, data) cellTable.txt_Rank.text = index + 1 cellTable.txt_Score.text = data.rollNum if data.acid == BattleDataGetter.GetAcID() then cellTable.txt_Name.text = UTL.Color.FormatTextByColor(UTL.Color.orange, data.name) else cellTable.txt_Name.text = UTL.Color.FormatWhiteColor(data.name) end end return UIGuildBossBattleRank