mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 12:03:21 +08:00
Use BindValueChanged
This commit is contained in:
parent
be66c0e912
commit
55a071e8ba
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user