private bool SwitchToEditDeckMode(CollectionDeck deck)
 {
     if ((CollectionManagerDisplay.Get() == null) || (deck == null))
     {
         return(false);
     }
     this.m_tavernBrawlTray.HideTray();
     this.UpdateDeckPanels(true, true);
     if (UniversalInputManager.UsePhoneUI == null)
     {
         this.m_editDeckButton.gameObject.SetActive(TavernBrawlManager.Get().CurrentMission().canEditDeck);
         this.m_editDeckButton.SetText(GameStrings.Get("GLUE_COLLECTION_DECK_DELETE"));
         if (this.m_editIcon != null)
         {
             this.m_editIcon.SetActive(false);
         }
         if (this.m_deleteIcon != null)
         {
             this.m_deleteIcon.SetActive(true);
         }
         this.m_editDeckHighlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
     }
     this.m_deckBeingEdited = deck.ID;
     BnetBar.Get().m_currencyFrame.RefreshContents();
     CollectionDeckTray.Get().EnterEditDeckModeForTavernBrawl();
     FriendChallengeMgr.Get().UpdateMyAvailability();
     return(true);
 }
 private void SetIndicator(bool val)
 {
     if (val != this.m_active)
     {
         this.m_active = val;
         this.m_indicator.SetActive(val);
         BnetBar.Get().UpdateLayout();
     }
 }
 public override void Hide()
 {
     StoreManager.Get().RemoveAuthorizationExitListener(new StoreManager.AuthorizationExitCallback(this.OnAuthExit));
     base.EnableFullScreenEffects(false);
     if (UniversalInputManager.UsePhoneUI != null)
     {
         BnetBar.Get().SetCurrencyType(null);
     }
     base.Hide();
 }
Пример #4
0
 public override void Unload()
 {
     if (UniversalInputManager.UsePhoneUI != null)
     {
         BnetBar.Get().ToggleActive(true);
     }
     this.m_unloading = true;
     CollectionManagerDisplay.Get().Unload();
     Network.SendAckCardsSeen();
     this.m_unloading = false;
 }
    public void AddToast(GameToast toast)
    {
        toast.transform.parent        = BnetBar.Get().m_questProgressToastBone.transform;
        toast.transform.localRotation = Quaternion.Euler(new Vector3(90f, 180f, 0f));
        toast.transform.localScale    = new Vector3(450f, 1f, 450f);
        toast.transform.localPosition = Vector3.zero;
        this.m_toasts.Add(toast);
        RenderUtils.SetAlpha(toast.gameObject, 0f);
        this.UpdateToastPositions();
        object[]  args      = new object[] { "amount", 1f, "time", 0.25f, "delay", 0.25f, "easeType", iTween.EaseType.easeInCubic, "oncomplete", "FadeOutToast", "oncompletetarget", base.gameObject, "oncompleteparams", toast };
        Hashtable hashtable = iTween.Hash(args);

        iTween.FadeTo(toast.gameObject, hashtable);
    }
 private void Awake()
 {
     s_instance   = this;
     this.m_toast = UnityEngine.Object.Instantiate <SocialToast>(this.m_socialToastPrefab);
     RenderUtils.SetAlpha(this.m_toast.gameObject, 0f);
     this.m_toast.gameObject.SetActive(false);
     this.m_toast.transform.parent        = BnetBar.Get().m_socialToastBone.transform;
     this.m_toast.transform.localRotation = Quaternion.Euler(new Vector3(90f, 180f, 0f));
     this.m_toast.transform.localScale    = (Vector3)this.TOAST_SCALE;
     this.m_toast.transform.position      = BnetBar.Get().m_socialToastBone.transform.position;
     BnetPresenceMgr.Get().AddPlayersChangedListener(new BnetPresenceMgr.PlayersChangedCallback(this.OnPlayersChanged));
     BnetPresenceMgr.Get().OnGameAccountPresenceChange += new Action <BattleNet.PresenceUpdate[]>(this.OnPresenceChanged);
     BnetFriendMgr.Get().AddChangeListener(new BnetFriendMgr.ChangeCallback(this.OnFriendsChanged));
     Network.Get().SetShutdownHandler(new Network.ShutdownHandler(this.ShutdownHandler));
     SoundManager.Get().Load("UI_BnetToast");
 }
Пример #7
0
 protected override void OnTwoScoopShown()
 {
     if (BnetBar.Get() != null)
     {
         BnetBar.Get().SuppressLoginTooltip(true);
     }
     if (base.ShouldMakeUtilRequests())
     {
         this.InitGoldRewardUI();
     }
     if (this.m_showNoGoldRewardText)
     {
         this.m_noGoldRewardText.gameObject.SetActive(true);
     }
     if (this.m_showWinProgress)
     {
         this.m_gamesWonIndicator.Show();
     }
 }
Пример #8
0
 public override void Show()
 {
     if ((OptionsMenu.Get() != null) && OptionsMenu.Get().IsShown())
     {
         UniversalInputManager.Get().CancelTextInput(base.gameObject, true);
         OptionsMenu.Get().Hide(true);
     }
     else
     {
         base.Show();
         if ((UniversalInputManager.UsePhoneUI != null) && (this.m_ratingsObject != null))
         {
             this.m_ratingsObject.SetActive(this.UseKoreanRating());
             base.m_menu.m_buttonContainer.UpdateSlices();
             base.LayoutMenuBackground();
         }
         this.ShowLoginTooltipIfNeeded();
         BnetBar.Get().m_menuButton.SetSelected(true);
     }
 }
 public bool BackFromDeckEdit(bool animate)
 {
     if (!this.IsInDeckEditMode())
     {
         return(false);
     }
     if (animate)
     {
         PresenceMgr.Get().SetPrevStatus();
     }
     if (CollectionManagerDisplay.Get().GetViewMode() != CollectionManagerDisplay.ViewMode.CARDS)
     {
         TAG_CLASS pageClass = (TavernBrawlManager.Get().CurrentDeck() != null) ? TavernBrawlManager.Get().CurrentDeck().GetClass() : TAG_CLASS.DRUID;
         CollectionManagerDisplay.Get().m_pageManager.JumpToCollectionClassPage(pageClass);
     }
     this.m_tavernBrawlTray.ToggleTraySlider(true, null, animate);
     this.RefreshStateBasedUI(animate);
     this.m_deckBeingEdited = 0L;
     BnetBar.Get().m_currencyFrame.RefreshContents();
     FriendChallengeMgr.Get().UpdateMyAvailability();
     this.UpdateEditOrCreate();
     if (UniversalInputManager.UsePhoneUI == null)
     {
         this.m_editDeckButton.SetText(GameStrings.Get("GLUE_EDIT"));
         if (this.m_editIcon != null)
         {
             this.m_editIcon.SetActive(true);
         }
         if (this.m_deleteIcon != null)
         {
             this.m_deleteIcon.SetActive(false);
         }
     }
     CollectionDeckTray.Get().ExitEditDeckModeForTavernBrawl();
     return(true);
 }
Пример #10
0
 public void SetCurrencyOverride(CurrencyType?type)
 {
     this.m_overrideCurrencyType = type;
     this.RefreshContents();
     BnetBar.Get().UpdateLayout();
 }
 public void OnStatusBarUpdate()
 {
     BnetBar.Get().UpdateLayout();
 }
Пример #12
0
 public override void Hide()
 {
     base.Hide();
     this.HideLoginTooltip();
     BnetBar.Get().m_menuButton.SetSelected(false);
 }
Пример #13
0
 private void OnOptionsMenuHidden()
 {
     UnityEngine.Object.Destroy(this.m_optionsMenu.gameObject);
     this.m_optionsMenu = null;
     AssetCache.ClearGameObject((string)this.OPTIONS_MENU_NAME);
     if ((!SceneMgr.Get().IsModeRequested(SceneMgr.Mode.FATAL_ERROR) && !ApplicationMgr.Get().IsResetting()) && BnetBar.Get().IsEnabled())
     {
         this.Show();
     }
 }