mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Use BindValueChanged
This commit is contained in:
parent
c41b1e9eb4
commit
c55d237db6
@ -68,14 +68,12 @@ namespace osu.Game.Overlays.Volume
|
||||
}
|
||||
});
|
||||
|
||||
Current.ValueChanged += muted =>
|
||||
Current.BindValueChanged(muted =>
|
||||
{
|
||||
icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp;
|
||||
icon.Size = new Vector2(muted.NewValue ? 18 : 20);
|
||||
icon.Margin = new MarginPadding { Right = muted.NewValue ? 2 : 0 };
|
||||
};
|
||||
|
||||
Current.TriggerChange();
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user