using Godot;
using System;

namespace SessionZeroApp;

public partial class ControlPanelButton : Panel
{

    public Action Pressed;

    public override void _GuiInput(InputEvent @event)
	{
		if (@event is not InputEventMouseButton eventMouseButton) return;

		if (eventMouseButton.ButtonIndex == MouseButton.Left && eventMouseButton.Pressed)
		{
			AcceptEvent(); 
			Pressed?.Invoke();
		}
	}

}
