summaryrefslogtreecommitdiff
path: root/scripts/GUI/InventoryMenu.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/GUI/InventoryMenu.cs')
-rw-r--r--scripts/GUI/InventoryMenu.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/GUI/InventoryMenu.cs b/scripts/GUI/InventoryMenu.cs
index 5bac62b..dd8e133 100644
--- a/scripts/GUI/InventoryMenu.cs
+++ b/scripts/GUI/InventoryMenu.cs
@@ -8,18 +8,18 @@ public partial class InventoryMenu : CanvasLayer
{
private static readonly PackedScene itemMenuEntryScene = GD.Load<PackedScene>("res://scenes/GUI/item_menu_entry.tscn");
+ private VBoxContainer itemsNode;
+
[Signal]
public delegate void ItemSelectedEventHandler(ConsumableItem item);
[Signal]
public delegate void ItemDropEventHandler(ConsumableItem item);
- private VBoxContainer ItemsNode { get; set; }
-
public override void _Ready()
{
base._Ready();
- ItemsNode = GetNode<VBoxContainer>("CenterContainer/PanelContainer/VBoxContainer/Items");
+ itemsNode = GetNode<VBoxContainer>("CenterContainer/PanelContainer/VBoxContainer/Items");
Hide();
}
@@ -55,7 +55,7 @@ public partial class InventoryMenu : CanvasLayer
ItemMenuEntry itemEntry = itemMenuEntryScene.Instantiate<ItemMenuEntry>();
- ItemsNode.AddChild(itemEntry);
+ itemsNode.AddChild(itemEntry);
itemEntry.Initialize(item, shortcut);
itemEntry.Activate += OnActivate;
itemEntry.Drop += OnDrop;