예제 #1
0
    private void Contract(Item item_prototype, int count)
    {
        list.Update_Row(item_prototype.Internal_Name,
                        new List <ScrollableList.TextData>()
        {
            new ScrollableList.TextData("CountText", string.Format("{0}x", count), true),
            new ScrollableList.TextData("NameText", item_prototype.Name, true),
            new ScrollableList.TextData("DurabilityText", null, false)
        },
                        new List <ScrollableList.ImageData>()
        {
            new ScrollableList.ImageData("IconImage", item_prototype.UI_Sprite, item_prototype.UI_Sprite_Type, true)
        },
                        new List <ScrollableList.ButtonData>()
        {
            new ScrollableList.ButtonData("ExpandButton", ">", delegate() { Expand(item_prototype, count); }, true, true),
            new ScrollableList.ButtonData("InvisibleButton", null, delegate() { Select_Item(item_prototype, true); }, true, true)
        });

        foreach (Item item in Inventory.Get_Items(item_prototype.Internal_Name))
        {
            list.Delete_Row(item.Id.ToString());
        }
    }