Add button click and checkbox toggle handlers for UI controls

This commit is contained in:
Stone_Red
2026-06-13 15:06:29 +02:00
parent 0bc9ca6cf2
commit decd79e6d3
5 changed files with 36 additions and 14 deletions
+8
View File
@@ -27,4 +27,12 @@ public class CheckBox() : Control("CheckBox")
get;
set => SetProperty(nameof(TextColor), ref field, value);
} = Color.White;
public override void HandleMouseEvent(MouseEvent mouseEvent)
{
if (mouseEvent.Type == MouseEventType.ButtonDown && mouseEvent.Button == MouseButton.Left)
{
IsChecked = !IsChecked;
}
}
}