Plugin development QoL improvements

This commit is contained in:
Stone-Red-Code
2021-07-19 19:22:11 +02:00
parent 985a68b33e
commit 83a6339a46
56 changed files with 119 additions and 31 deletions
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{
public class Button : Element
{
public event Action OnClick;
private string _value;
public string Value
{
get => _value;
set
{
if (_value != value)
{
_value = value;
ValueChanged();
}
}
}
public Button(string value)
{
Value = value;
}
public void Click()
{
OnClick?.Invoke();
}
}
}