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()
{
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();
}