Use BindValueChanged

This commit is contained in:
Dean Herbert 2019-09-11 19:12:55 +09:00
parent be66c0e912
commit 55a071e8ba
1 changed files with 5 additions and 5 deletions

View File

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