Beispiel #1
0
    // Token: 0x060031A9 RID: 12713 RVA: 0x000BEB4C File Offset: 0x000BCD4C
    public override void PopulateInfoWindow(global::ItemToolTip infoWindow, global::IInventoryItem tipItem)
    {
        infoWindow.AddItemTitle(this, tipItem, 0f);
        infoWindow.AddConditionInfo(tipItem);
        infoWindow.AddSectionTitle("Protection", 0f);
        for (int i = 0; i < 6; i++)
        {
            if (this.armorValues[i] != 0f)
            {
                float      contentHeight = infoWindow.GetContentHeight();
                GameObject gameObject    = infoWindow.AddBasicLabel(global::TakeDamage.DamageIndexToString((global::DamageTypeIndex)i), 0f);
                GameObject gameObject2   = infoWindow.AddBasicLabel("+" + ((int)this.armorValues[i]).ToString("N0"), 0f);
                gameObject2.transform.SetLocalPositionX(145f);
                gameObject2.GetComponentInChildren <global::UILabel>().color = Color.green;
                gameObject.transform.SetLocalPositionY(-(contentHeight + 10f));
                gameObject2.transform.SetLocalPositionY(-(contentHeight + 10f));
            }
        }
        infoWindow.AddSectionTitle("Equipment Slot", 20f);
        string text = "Head, Chest, Legs, Feet";

        if ((this._itemFlags & global::Inventory.SlotFlags.Head) == global::Inventory.SlotFlags.Head)
        {
            text = "Head";
        }
        else if ((this._itemFlags & global::Inventory.SlotFlags.Chest) == global::Inventory.SlotFlags.Chest)
        {
            text = "Chest";
        }
        infoWindow.AddBasicLabel(text, 10f);
        infoWindow.AddItemDescription(this, 15f);
        infoWindow.FinishPopulating();
    }