mirror of https://github.com/ppy/osu
Use BindValueChanged
This commit is contained in:
parent
be66c0e912
commit
55a071e8ba
|
@ -48,14 +48,14 @@ private void load(AudioManager audio)
|
|||
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue