|
|
@ -5,56 +5,28 @@ namespace Blazor.Components
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public partial class InventoryListImage
|
|
|
|
public partial class InventoryListImage
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[Parameter]
|
|
|
|
|
|
|
|
public int Index { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
[Parameter]
|
|
|
|
public Item Item { get; set; }
|
|
|
|
public Item Item { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
|
|
|
|
public bool NoDrop { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[CascadingParameter]
|
|
|
|
[CascadingParameter]
|
|
|
|
public Crafting Parent { get; set; }
|
|
|
|
public Crafting Parent { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
internal void OnDragEnter()
|
|
|
|
internal void OnDragEnter()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (NoDrop)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parent.Actions.Add(new CraftingAction { Action = "Drag Enter", Item = this.Item, Index = this.Index });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal void OnDragLeave()
|
|
|
|
internal void OnDragLeave()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (NoDrop)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parent.Actions.Add(new CraftingAction { Action = "Drag Leave", Item = this.Item, Index = this.Index });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal void OnDrop()
|
|
|
|
internal void OnDrop()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (NoDrop)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Item = Parent.CurrentDragItem;
|
|
|
|
|
|
|
|
Parent.RecipeItems[this.Index] = this.Item;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parent.Actions.Add(new CraftingAction { Action = "Drop", Item = this.Item, Index = this.Index });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnDragStart()
|
|
|
|
private void OnDragStart()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Parent.CurrentDragItem = this.Item;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parent.Actions.Add(new CraftingAction { Action = "Drag Start", Item = this.Item, Index = this.Index });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|