public void Add(Graphic type, Graphic graphic, UOColor color, bool stock, Point offset, bool flowBreak) { var sc = new SupplyCounter(World.Player.Backpack, type, color); var c = new ItemCount(sc, graphic, color, stock, offset); c.Size = ItemSize; container.Controls.Add(c); container.SetFlowBreak(c, flowBreak); }
public void AddItem(string name, Graphic type, UOColor color) { var sc = new SupplyCounter(UO.Backpack, type, color); var item = new ItemInfo { Name = name, Amount = sc.CurrentAmount }; data.Add(item); sc.AmountChanged += delegate(object sender, EventArgs e) { item.Amount = sc.CurrentAmount; UpdateText(); }; }