local UIHeroSelectPanel = require "View/HeroSelect/UIHeroSelectPanel" local UIGoldenHeroTryShow = UIViewClass(UIHeroSelectPanel) function UIGoldenHeroTryShow:OnOpened(context) self.activityId = context.activityId self:RegistSystemEvent(EventID.UI_OperationActivity_CloseView, self.OnCloseActivitySelf) UIUtils.SetActive(self.loopScroll_Heads, false) self.group_Btns:SetAnchoredPosition(0, 125, 0) end function UIGoldenHeroTryShow:InitToggles() UIHeroSelectPanel.InitToggles(self) UIUtils.SetActive(self.subToggles, false) end function UIGoldenHeroTryShow:OnCloseActivitySelf(viewClassPath, activityId) if viewClassPath == self.__viewClassPath then if self.activityId and activityId == self.activityId then self:CloseView(true) end end end function UIGoldenHeroTryShow:OnClickEnter() MDL.HeroSelect.curSelectHeroID = self.curSelectHeroID self.context = self.context or {} self.context.heroID = self.curSelectHeroID UIManager.OpenAndPushAll(Const_UI_Lua.UIEnum.UIHeroShowPanel, {isHideArrow = true}) end return UIGoldenHeroTryShow