1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 12:03:21 +08:00

Use BindValueChanged

This commit is contained in:
Dean Herbert 2019-09-11 19:12:55 +09:00
parent be66c0e912
commit 55a071e8ba

View File

@ -48,14 +48,14 @@ namespace osu.Game.Graphics.Containers
protected override void LoadComplete() protected override void LoadComplete()
{ {
OverlayActivationMode.ValueChanged += mode => if (game != null)
OverlayActivationMode.BindTo(game.OverlayActivationMode);
OverlayActivationMode.BindValueChanged(mode =>
{ {
if (mode.NewValue == OverlayActivation.Disabled) if (mode.NewValue == OverlayActivation.Disabled)
State.Value = Visibility.Hidden; State.Value = Visibility.Hidden;
}; }, true);
if (game != null)
OverlayActivationMode.BindTo(game.OverlayActivationMode);
base.LoadComplete(); base.LoadComplete();
} }