sasalka/Code/button.cs
2025-05-25 18:16:55 +03:00

16 lines
235 B
C#

using System;
using Sandbox;
using Sandbox.UI;
namespace Sandbox;
public sealed class ButtonComponent : Component, IInteractable
{
[Property] public Action OnClick { get; set; }
public void OnUse()
{
OnClick?.Invoke();
}
}