Move items

This commit is contained in:
cblech
2025-04-07 02:10:59 +02:00
parent 959ab68b4d
commit c90687939c
18 changed files with 235 additions and 15 deletions
+27
View File
@@ -0,0 +1,27 @@
using Godot;
using System;
namespace Babushka.scripts.CSharp.Common.Inventory;
public partial class SlotUi : Control
{
public Label nameLabel;
public int index;
[Signal] public delegate void ClickedEventHandler(int index);
public override void _EnterTree()
{
nameLabel = GetNode<Label>("NameLabel");
}
public void _on_gui_input(InputEvent ev)
{
if (ev is not InputEventMouseButton mev) return;
if (mev.Pressed)
{
EmitSignalClicked(index);
}
}
}