コード例 #1
0
    // Token: 0x06002AF7 RID: 10999 RVA: 0x0009F830 File Offset: 0x0009DA30
    public int AddItemsOfCategory(global::ItemDataBlock.ItemCategory category, List <global::BlueprintDataBlock> checkList, int yPos)
    {
        if (!this.AnyOfCategoryInList(category, checkList))
        {
            return(yPos);
        }
        GameObject gameObject = global::NGUITools.AddChild(base.gameObject, this.CategoryHeaderPrefab);

        gameObject.transform.localPosition = new Vector3(0f, (float)yPos, -1f);
        gameObject.GetComponentInChildren <global::UILabel>().text = category.ToString();
        yPos -= 16;
        foreach (global::BlueprintDataBlock blueprintDataBlock in checkList)
        {
            if (blueprintDataBlock.resultItem.category == category)
            {
                GameObject gameObject2 = global::NGUITools.AddChild(base.gameObject, this.ItemPlaquePrefab);
                gameObject2.GetComponentInChildren <global::UILabel>().text = blueprintDataBlock.resultItem.name;
                gameObject2.transform.localPosition = new Vector3(10f, (float)yPos, -1f);
                global::UIEventListener uieventListener  = global::UIEventListener.Get(gameObject2);
                global::UIEventListener uieventListener2 = uieventListener;
                uieventListener2.onClick = (global::UIEventListener.VoidDelegate)Delegate.Combine(uieventListener2.onClick, new global::UIEventListener.VoidDelegate(this.craftWindow.ItemClicked));
                gameObject2.GetComponent <global::RPOSCraftItemEntry>().actualItemDataBlock = blueprintDataBlock.resultItem;
                gameObject2.GetComponent <global::RPOSCraftItemEntry>().blueprint           = blueprintDataBlock;
                gameObject2.GetComponent <global::RPOSCraftItemEntry>().craftWindow         = this.craftWindow;
                gameObject2.GetComponent <global::RPOSCraftItemEntry>().SetSelected(false);
                yPos -= 16;
            }
        }
        return(yPos);
    }
コード例 #2
0
 // Token: 0x06002AF4 RID: 10996 RVA: 0x0009F700 File Offset: 0x0009D900
 public bool AnyOfCategoryInList(global::ItemDataBlock.ItemCategory category, List <global::BlueprintDataBlock> checkList)
 {
     foreach (global::BlueprintDataBlock blueprintDataBlock in checkList)
     {
         if (blueprintDataBlock == null)
         {
             Debug.Log("WTFFFF");
             return(false);
         }
         if (blueprintDataBlock.resultItem.category == category)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
 // Token: 0x06002AF5 RID: 10997 RVA: 0x0009F794 File Offset: 0x0009D994
 public void AddItemCategoryHeader(global::ItemDataBlock.ItemCategory category)
 {
 }