private void ShowActivationView(PerkVO perkVO, bool isActivation)
 {
     this.lastGridPosition   = this.perksGrid.GetCurrentScrollPosition(true);
     this.openedModalOnTop   = true;
     this.activationInfoView = new SquadScreenActivationInfoView(this.screen, perkVO, isActivation);
     this.activationInfoView.Show();
 }
 private void CleanUpActivationInfoView()
 {
     this.openedModalOnTop = false;
     if (this.activationInfoView != null)
     {
         this.activationInfoView.HideAndCleanUp();
         this.activationInfoView = null;
     }
 }
        public override EatResponse OnEvent(EventId id, object cookie)
        {
            switch (id)
            {
            case EventId.ActivePerksUpdated:
            case EventId.SquadPerkUpdated:
            case EventId.SquadLeveledUp:
                this.RefreshPerkStates();
                break;

            case EventId.PerkUnlocked:
            case EventId.PerkUpgraded:
                if (this.activationInfoView != null)
                {
                    PerkViewController perkViewController = Service.Get <PerkViewController>();
                    PerkVO             perkVO             = (PerkVO)cookie;
                    string             perkGroup          = perkVO.PerkGroup;
                    if (perkViewController.IsPerkGroupBadged(perkGroup))
                    {
                        this.CleanUpActivationInfoView();
                        perkViewController.RemovePerkGroupFromBadgeList(perkGroup);
                        this.screen.UpdateBadges();
                        Service.Get <ViewTimerManager>().CreateViewTimer(this.TIME_DELAY_TO_SHOW_CELEB, false, new TimerDelegate(this.ShowCelebAfterDelay), cookie);
                        return(EatResponse.NotEaten);
                    }
                }
                break;

            case EventId.PerkCelebClosed:
                this.ResetVisibilityStates();
                this.RefreshPerkStates();
                break;

            case EventId.PerkActivationClosed:
                this.activationInfoView = null;
                this.ResetVisibilityStates();
                this.RefreshPerkStates();
                break;
            }
            return(base.OnEvent(id, cookie));
        }