public override void OnDrop(UIBase ui) { if (ui is UIItemStack) { ItemStack = ui as UIItemStack; } }
public bool AddItemStack(UIItemStack itemStack) { var cell = GetNotFullCellByInfoItem(itemStack.InfoItem); if (cell != null) { cell.ItemStack = itemStack; return(true); } else { foreach (var c in cells) { if (c.ItemStack == null) { c.ItemStack = itemStack; return(true); } } } return(false); }