Inline delegate event

This commit is contained in:
Dean Herbert 2019-10-14 21:49:02 +09:00
parent b7ddf160b4
commit f0e9700349

View File

@ -114,15 +114,10 @@ namespace osu.Game.Overlays.Comments
protected override void LoadComplete()
{
Checked.BindValueChanged(onCheckedChanged, true);
Checked.BindValueChanged(isChecked => checkboxIcon.Icon = isChecked.NewValue ? FontAwesome.Solid.CheckSquare : FontAwesome.Regular.Square, true);
base.LoadComplete();
}
private void onCheckedChanged(ValueChangedEvent<bool> isChecked)
{
checkboxIcon.Icon = isChecked.NewValue ? FontAwesome.Solid.CheckSquare : FontAwesome.Regular.Square;
}
protected override bool OnClick(ClickEvent e)
{
Checked.Value = !Checked.Value;