Add click event to Button and checked changed event to CheckBox

This commit is contained in:
Stone_Red
2026-06-12 15:18:14 +02:00
parent f9cc016f01
commit 671c6413cf
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -4,6 +4,8 @@ namespace RemSox.UI.GUI.UIEelements.Controls;
public class Button() : Control("Button")
{
public event EventHandler? OnClick;
public string Text
{
get;
@@ -15,4 +17,9 @@ public class Button() : Control("Button")
get;
set => SetProperty(nameof(TextColor), ref field, value);
} = Color.Black;
public void Click()
{
OnClick?.Invoke(this, EventArgs.Empty);
}
}