protected override void onPreShow([Optional, DefaultParameterValue(null)] object param) { Player player = GameLogic.Binder.GameState.Player; if (param != null) { this.m_inputParams = new InputParameters?((InputParameters)param); } else { this.m_inputParams = null; } PlayerView.Binder.MenuSystem.initializeMenuHero(player.ActiveCharacter); PlayerView.Binder.MenuSystem.CharacterMenuCamera.Target = PlayerView.Binder.MenuSystem.MenuHero; PlayerView.Binder.MenuSystem.MenuHero.CharacterView.gameObject.SetActive(true); PlayerView.Binder.MenuSystem.MenuHero.CharacterView.setVisibility(true); PlayerView.Binder.MenuSystem.CharacterMenuCamera.Camera.enabled = true; MenuCharacterView target = PlayerView.Binder.MenuSystem.CharacterMenuCamera.Target; this.HeroAvatarDragHandler.OnDragged += new MenuDragHandler.Dragged(target.OnDrag); this.refreshGenderToggle(); this.refreshMissionCount(player); this.refreshMissionFeatureAvailability(player); for (int i = 0; i < this.m_heroStatCells.Count; i++) { this.m_heroStatCells[i].gameObject.SetActive(true); } this.onRefresh(); if (this.m_inputParams.HasValue && (this.m_inputParams.Value.DefaultMenuContent != MenuContentType.NONE)) { ((StackedPopupMenu)base.m_contentMenu).Smcc.pushContent(this.m_inputParams.Value.DefaultMenuContent, null, false); } }
private void cleanupHeader() { if (this.m_heroAvatarCharacterInstance != null) { GameLogic.Binder.CharacterPool.returnObject(this.m_heroAvatarCharacterInstance); this.m_heroAvatarCharacterInstance = null; } if (PlayerView.Binder.MenuSystem.MenuHero.CharacterView != null) { PlayerView.Binder.MenuSystem.MenuHero.CharacterView.gameObject.SetActive(false); } if (PlayerView.Binder.MenuSystem.MenuPet.CharacterView != null) { PlayerView.Binder.MenuSystem.MenuPet.CharacterView.gameObject.SetActive(false); } this.HeaderHeroAvatar.enabled = false; this.HeaderHeroAvatar.texture = null; this.HeaderPetAvatar.enabled = false; this.HeaderPetAvatar.texture = null; PlayerView.Binder.MenuSystem.CharacterMenuCamera.Camera.enabled = false; if (PlayerView.Binder.MenuSystem.CharacterMenuCamera.Target != null) { MenuCharacterView target = PlayerView.Binder.MenuSystem.CharacterMenuCamera.Target; this.HeaderAvatarDragHandler.OnDragged -= new MenuDragHandler.Dragged(target.OnDrag); } }
protected override void onCleanup() { for (int i = this.m_heroStatCells.Count - 1; i >= 0; i--) { HeroStatCell cell = this.m_heroStatCells[i]; cell.gameObject.SetActive(false); } PlayerView.Binder.MenuSystem.CharacterMenuCamera.Camera.enabled = false; MenuCharacterView target = PlayerView.Binder.MenuSystem.CharacterMenuCamera.Target; this.HeroAvatarDragHandler.OnDragged -= new MenuDragHandler.Dragged(target.OnDrag); PlayerView.Binder.MenuSystem.MenuHero.CharacterView.gameObject.SetActive(false); }