local UIGuildCheckPanel = UIViewClass() function UIGuildCheckPanel:OnOpened(context) local index = 1 for _,data in DataSheetManager.GuildJob:GetEnumerator() do if self.titiles[index] then self.titiles[index].text = UIUtils.GetLocalizedTxt(Const_IDS[data.JobName]) index = index + 1 end end for _,data in DataSheetManager.GuildAuthority:GetEnumerator() do self.LoopScroll_Details:AddData(data,0) end UIUtils.SetLabelText(self.UICommonPopUp.txt_Title,Const_IDS.IDS_GuildMainpage_Button5) end function UIGuildCheckPanel:OnBackButtonPressed() self:OnButtonClicked(self.UICommonPopUp.btn_Close) end function UIGuildCheckPanel:OnButtonClicked(comp) if comp == self.UICommonPopUp.btn_Close then self:CloseView() end end function UIGuildCheckPanel:OnCellInit(scrollRect, index, cellTable, data) local ind = 1 for _,d in DataSheetManager.GuildJob:GetEnumerator() do local exist = false for i,v in ipairs(d.JobID) do if v == data.ID then exist = true end end if cellTable.masks[ind] then cellTable.masks[ind].gameObject:SetActive(exist) end ind = ind + 1 end cellTable.lab_Title.text = UIUtils.GetLocalizedTxt(Const_IDS[data.AuthorityName]) cellTable.bg_State:SetState(index%2) end return UIGuildCheckPanel