Avoid intermediary delegate

This commit is contained in:
Dean Herbert 2020-12-14 15:34:32 +09:00
parent b4a9c0e03c
commit 7041503063
1 changed files with 4 additions and 4 deletions

View File

@ -111,13 +111,13 @@ private void load()
protected override void LoadComplete()
{
base.LoadComplete();
major.BindValueChanged(majorChanged => updateMajor(majorChanged.NewValue), true);
major.BindValueChanged(updateMajor);
}
private void updateMajor(bool major)
private void updateMajor(ValueChangedEvent<bool> major)
{
line.Alpha = major ? 1f : 0.75f;
triangleContainer.Alpha = major ? 1 : 0;
line.Alpha = major.NewValue ? 1f : 0.75f;
triangleContainer.Alpha = major.NewValue ? 1 : 0;
}
protected override void OnApply()