Beispiel #1
0
        private void ChangeItem(ushort item, ushort count)
        {
            var pb = PB_Item;

            pb.BackColor       = ItemColor.GetItemColor(item);
            pb.BackgroundImage = ItemSprite.GetItemSprite(item, count);
        }
Beispiel #2
0
        private void cbItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            var selectedItemId = (ushort)(int)cbItem.SelectedValue;
            var itemCount      = (ushort)0;

            pbItem.BackColor = ItemColor.GetItemColor(selectedItemId);
            pbItem.Image     = ItemSprite.GetItemSprite(selectedItemId, itemCount);
            SelectedItemInfo = itemConvertor.FromItemId(selectedItemId);
            OnItemChanged();
        }
Beispiel #3
0
        private void SetItemSprite(Item item, PictureBox pb)
        {
            var dw   = Sprites.Width;
            var dh   = Sprites.Height;
            var font = L_ItemName.Font;

            pb.BackColor       = ItemColor.GetItemColor(item);
            pb.BackgroundImage = ItemSprite.GetItemSprite(item);
            var backing = new Bitmap(dw, dh);

            pb.Image = ItemSprite.GetItemMarkup(item, font, dw, dh, backing);
        }