diff --git a/BlazorApp1/Components/InventoryComponent.razor b/BlazorApp1/Components/InventoryComponent.razor
index 9ac1eca..6c02e2d 100644
--- a/BlazorApp1/Components/InventoryComponent.razor
+++ b/BlazorApp1/Components/InventoryComponent.razor
@@ -54,8 +54,11 @@
@foreach (var item in Items)
{
-
-
+
+
}
diff --git a/BlazorApp1/Components/InventoryComponent.razor.css b/BlazorApp1/Components/InventoryComponent.razor.css
index 31bf51e..76e71ac 100644
--- a/BlazorApp1/Components/InventoryComponent.razor.css
+++ b/BlazorApp1/Components/InventoryComponent.razor.css
@@ -16,4 +16,8 @@
border: 1px solid black;
height: 250px;
overflow: scroll;
+}
+
+.listeItem {
+ display: inline;
}
\ No newline at end of file
diff --git a/BlazorApp1/Components/InventoryItem.razor.cs b/BlazorApp1/Components/InventoryItem.razor.cs
index b561e1e..1ed11c9 100644
--- a/BlazorApp1/Components/InventoryItem.razor.cs
+++ b/BlazorApp1/Components/InventoryItem.razor.cs
@@ -39,8 +39,8 @@ namespace BlazorApp1.Components
internal void OnDrop()
{
- Item CurrentHoldItem = new Item();//A remplir avec les valeurs de CurrentDragItem
- //CurrentHoldItem = Parent.CurrentDragItem;
+ Item CurrentHoldItem = new Item(Parent.CurrentDragItem.Id, Parent.CurrentDragItem.DisplayName, Parent.CurrentDragItem.Name, Parent.CurrentDragItem.StackSize, Parent.CurrentDragItem.Stack, Parent.CurrentDragItem.MaxDurability, Parent.CurrentDragItem.EnchantCategories, Parent.CurrentDragItem.RepairWith, Parent.CurrentDragItem.CreatedDate, Parent.CurrentDragItem.UpdatedDate, Parent.CurrentDragItem.ImageBase64);
+
if (NoDrop)
{
@@ -54,7 +54,9 @@ namespace BlazorApp1.Components
CurrentHoldItem.Stack = CurrentHoldItem.Stack + this.Item.Stack;
this.Item = CurrentHoldItem;
}
- else { return; }
+ else {
+ return;
+ }
}
else
@@ -67,7 +69,7 @@ namespace BlazorApp1.Components
private void OnDragStart()
{
- Parent.CurrentDragItem = this.Item;
+ Parent.CurrentDragItem = new Item(this.Item.Id, this.Item.DisplayName, this.Item.Name, this.Item.StackSize, 1, this.Item.MaxDurability, this.Item.EnchantCategories, this.Item.RepairWith, this.Item.CreatedDate, this.Item.UpdatedDate, this.Item.ImageBase64);
Parent.Actions.Add(new CraftingAction { Action = "Drag Start", Item = this.Item, Index = this.Index });
}