Ejemplo n.º 1
0
 /** Clears inspection slots contents and unlocks origional. */
 public void Restore()
 {
     if ((OrigionalSource != null) && (!OrigionalSource.IsEmpty))
     {
         OrigionalSource.DDContent.SelfEnabled = true;
         DDContent = new GuiItem();
     }
 }
Ejemplo n.º 2
0
 /** Deletes the origional copy of the currently selected item */
 public void Delete()
 {
     if (!IsEmpty)
     {
         if (OrigionalSource != null)
         {
             OrigionalSource.DDContent = new GuiItem();
         }
         DDContent = new GuiItem();
     }
 }
Ejemplo n.º 3
0
 /** Create a new item */
 public GuiItemSlot(int x, int y, MDRItemSlot dataLink = null)
     : base(x, y)
 {
     IDPartial          = IDPartial ?? ResourceManager.GetSprite("Icons/SlotIDPartial");
     IDNone             = IDNone ?? ResourceManager.GetSprite("Icons/SlotIDNone");
     ItemIcon           = new GuiItem();
     DataLink           = dataLink;
     ShowToolTipOnHover = true;
     OnDoubleClicked   += delegate {
         if (!Locked)
         {
             UseOrEquipItem();
         }
     };
 }
Ejemplo n.º 4
0
        public void Apply()
        {
            RingColor      = Color.clear;
            IndicatorColor = Color.clear;

            if (ItemIcon == null)
            {
                return;
            }

            if ((DataLink == null) || (DataLink.ItemInstance == null))
            {
                ItemIcon.ItemInstance = null;
            }
            else
            {
                ItemIcon.ItemInstance = DataLink.ItemInstance;
            }

            if (DataLink == null)
            {
                return;
            }

            updateItemDisplay();

            // show restricted slots when dragging an item
            if ((ItemRestriction != ItemLocation.Any) && (Engine.DragDrop.DDContent != null) && (Engine.DragDrop.DDContent is GuiItem))
            {
                GuiItem item = (Engine.DragDrop.DDContent as GuiItem);
                if (ItemRestriction == item.ItemInstance.Item.Type.TypeClass.Location)
                {
                    RingColor = item.ItemInstance.CanBeEquipedBy(CoM.Party.Selected) ? Colors.ItemCanEquipRing : Colors.ItemCanNotEquipedRing;
                }
            }
            _dirty = false;
        }