// Token: 0x06002A24 RID: 10788 RVA: 0x0009C388 File Offset: 0x0009A588
    public GameObject AddProgressStat(string text, float currentAmount, float maxAmount, float aboveSpace)
    {
        float            contentHeight       = this.GetContentHeight();
        GameObject       gameObject          = global::NGUITools.AddChild(this.addParent, this.progressStatPrefab);
        global::UISlider componentInChildren = gameObject.GetComponentInChildren <global::UISlider>();
        global::UILabel  component           = global::FindChildHelper.FindChildByName("ProgressStatTitle", gameObject.gameObject).GetComponent <global::UILabel>();
        global::UILabel  component2          = global::FindChildHelper.FindChildByName("ProgressAmountLabel", gameObject.gameObject).GetComponent <global::UILabel>();

        component.text  = text;
        component2.text = ((currentAmount >= 1f) ? currentAmount.ToString("N0") : currentAmount.ToString("N2"));
        componentInChildren.sliderValue = currentAmount / maxAmount;
        gameObject.transform.SetLocalPositionY(-(contentHeight + aboveSpace));
        return(gameObject);
    }
    // Token: 0x06002A13 RID: 10771 RVA: 0x0009BCAC File Offset: 0x00099EAC
    public void Update()
    {
        if (global::RPOS.ObservedPlayer == null)
        {
            return;
        }
        global::CraftingInventory component = global::RPOS.ObservedPlayer.GetComponent <global::CraftingInventory>();

        if (component == null)
        {
            return;
        }
        bool isCrafting = component.isCrafting;

        if (isCrafting)
        {
            component.CraftThink();
        }
        if (!isCrafting && this.wasCrafting)
        {
            this.UpdateIngredients();
        }
        else if (!this.wasCrafting && isCrafting)
        {
            this.craftSound.Play();
        }
        if (this.craftButton.gameObject.activeSelf)
        {
            this.craftButton.GetComponentInChildren <global::UILabel>().text = ((!component.isCrafting) ? "Craft" : "Cancel");
        }
        if (this.craftProgressBar && this.craftProgressBar.gameObject && this.craftProgressBar.gameObject.activeSelf)
        {
            global::UISlider uislider = this.craftProgressBar;
            float?           craftingCompletePercent = component.craftingCompletePercent;
            uislider.sliderValue = ((craftingCompletePercent == null) ? 0f : craftingCompletePercent.Value);
            float?craftingSecondsRemaining = component.craftingSecondsRemaining;
            float num = (craftingSecondsRemaining == null) ? 0f : craftingSecondsRemaining.Value;
            if (num != this._lastTimeStringValue)
            {
                this._lastTimeStringString = num.ToString("0.0");
                this._lastTimeStringValue  = num;
            }
            this.progressLabel.text = this._lastTimeStringString;
            Color color = Color.white;
            float craftingSpeedPerSec = component.craftingSpeedPerSec;
            if (craftingSpeedPerSec > 1f)
            {
                color = Color.green;
            }
            else if (craftingSpeedPerSec < 1f)
            {
                color = Color.yellow;
            }
            else if (craftingSpeedPerSec < 0.5f)
            {
                color = Color.red;
            }
            this.progressLabel.color = color;
        }
        if (this.selectedItem != null)
        {
            this.UpdateWorkbenchRequirements();
        }
        if (this.progressLabel)
        {
            this.progressLabel.enabled = isCrafting;
        }
        this.wasCrafting = component.isCrafting;
    }