public virtual void CopyToDragItem(DragItemHolder dragItem)
 {
     if (Item.Type == "trinket")
     {
         dragItem.backIcon.enabled = true;
         dragItem.backIcon.sprite  = rarityIcon.sprite;
         dragItem.itemIcon.sprite  = itemIcon.sprite;
     }
     else
     {
         dragItem.backIcon.enabled = false;
         dragItem.itemIcon.sprite  = itemIcon.sprite;
     }
 }
Exemplo n.º 2
0
        protected override void OnMouseMove(MouseEventArgs e)
        {
            if (!AllowDrag || !Drag || TookElement)
            {
                return;
            }
            if (e.X < offset.X + 10 && e.X > offset.X - 10 && e.Y < offset.Y + 10 && e.Y > offset.Y - 10)
            {
                return;
            }
            TookElement = true;
            Point location = FindForm().PointToClient(Parent.PointToScreen(Location));

            location.X = location.X + e.X - Width / 2;
            location.Y = location.Y + e.Y - Height / 2;
            DragItemHolder lbed = new DragItemHolder(new[] { dragItem }, this, location);

            dragItem = null;
            Invalidate();
        }
Exemplo n.º 3
0
 public void CopyToDragItem(DragItemHolder heroHolder)
 {
     heroHolder.itemIcon.sprite = portrait.sprite;
 }
Exemplo n.º 4
0
 public virtual void CopyToDragItem(DragItemHolder dragItem)
 {
     dragItem.backIcon.enabled = false;
     dragItem.itemIcon.sprite  = itemIcon.sprite;
 }