private void Awake()
 {
     s_Instance = this;
     this.m_headlineText.Text        = GameStrings.Get("GLUE_MASS_DISENCHANT_HEADLINE");
     this.m_detailsHeadlineText.Text = GameStrings.Get("GLUE_MASS_DISENCHANT_DETAILS_HEADLINE");
     this.m_disenchantButton.SetText(GameStrings.Get("GLUE_MASS_DISENCHANT_BUTTON_TEXT"));
     if (this.m_detailsText != null)
     {
         this.m_detailsText.Text = GameStrings.Get("GLUE_MASS_DISENCHANT_DETAILS");
     }
     if (this.m_singleSubHeadlineText != null)
     {
         this.m_singleSubHeadlineText.Text = GameStrings.Get("GLUE_MASS_DISENCHANT_SUB_HEADLINE_TEXT");
     }
     if (this.m_doubleSubHeadlineText != null)
     {
         this.m_doubleSubHeadlineText.Text = GameStrings.Get("GLUE_MASS_DISENCHANT_SUB_HEADLINE_TEXT");
     }
     this.m_disenchantButton.SetUserOverYOffset(-0.04409015f);
     foreach (DisenchantBar bar in this.m_singleDisenchantBars)
     {
         bar.Init();
     }
     foreach (DisenchantBar bar2 in this.m_doubleDisenchantBars)
     {
         bar2.Init();
     }
     CollectionManager.Get().RegisterMassDisenchantListener(new CollectionManager.OnMassDisenchant(this.OnMassDisenchant));
 }
    public void UpdateVisuals(int totalNumCards)
    {
        this.m_numCardsText.Text = this.m_numCards.ToString();
        this.m_amountText.Text   = this.m_amount.ToString();
        if (this.m_numGoldText != null)
        {
            if (this.m_numGoldCards > 0)
            {
                this.m_numGoldText.gameObject.SetActive(true);
                object[] args = new object[] { this.m_numGoldCards.ToString() };
                this.m_numGoldText.Text = GameStrings.Format("GLUE_MASS_DISENCHANT_NUM_GOLDEN_CARDS", args);
                TransformUtil.SetLocalPosX(this.m_numCardsText, 7.638979f);
                this.m_barFrameMesh.GetComponent <MeshFilter>().mesh = MassDisenchant.Get().m_rarityBarGoldMesh;
                this.m_barFrameMesh.material = MassDisenchant.Get().m_rarityBarGoldMaterial;
            }
            else
            {
                this.m_numGoldText.gameObject.SetActive(false);
                TransformUtil.SetLocalPosX(this.m_numCardsText, 2.902672f);
                this.m_barFrameMesh.GetComponent <MeshFilter>().mesh = MassDisenchant.Get().m_rarityBarNormalMesh;
                this.m_barFrameMesh.material = MassDisenchant.Get().m_rarityBarNormalMaterial;
            }
        }
        float num = (totalNumCards <= 0f) ? 0f : (((float)this.m_numCards) / ((float)totalNumCards));

        this.m_amountBar.GetComponent <Renderer>().material.SetFloat("_Percent", num);
    }
 private void OnMassDisenchantButtonReleased(UIEvent e)
 {
     if (!CollectionManagerDisplay.Get().m_pageManager.ArePagesTurning())
     {
         if (CollectionManagerDisplay.Get().m_pageManager.IsShowingMassDisenchant())
         {
             CollectionManagerDisplay.Get().m_pageManager.HideMassDisenchant();
             this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
         }
         else
         {
             CollectionManagerDisplay.Get().m_pageManager.ShowMassDisenchant();
             base.StartCoroutine(MassDisenchant.Get().StartHighlight());
         }
         SoundManager.Get().LoadAndPlay("Hub_Click");
     }
 }