From 55a071e8ba9bfe68ba237daa81a1024a43366d92 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 11 Sep 2019 19:12:55 +0900 Subject: [PATCH] Use BindValueChanged --- .../Graphics/Containers/OsuFocusedOverlayContainer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs b/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs index a1df973b60..2e8910213b 100644 --- a/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs +++ b/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs @@ -48,14 +48,14 @@ namespace osu.Game.Graphics.Containers protected override void LoadComplete() { - OverlayActivationMode.ValueChanged += mode => + if (game != null) + OverlayActivationMode.BindTo(game.OverlayActivationMode); + + OverlayActivationMode.BindValueChanged(mode => { if (mode.NewValue == OverlayActivation.Disabled) State.Value = Visibility.Hidden; - }; - - if (game != null) - OverlayActivationMode.BindTo(game.OverlayActivationMode); + }, true); base.LoadComplete(); }