From 7904f77cd5cd716c6547b3ee8a7dea2bd79ce5df Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Fri, 27 Sep 2019 02:59:42 +0300 Subject: [PATCH] Bind event to activation delay change --- osu.Game/Screens/Play/HUD/HoldForMenuButton.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs index 6b2bbc13b7..9c1435ef3d 100644 --- a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs +++ b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs @@ -63,9 +63,13 @@ namespace osu.Game.Screens.Play.HUD [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - text.Text = config.Get(OsuSetting.UIHoldActivationDelay) > 0 - ? "hold for menu" - : "press for menu"; + var activationDelay = config.GetBindable(OsuSetting.UIHoldActivationDelay).GetBoundCopy(); + activationDelay.BindValueChanged(v => + { + text.Text = v.NewValue > 0 + ? "hold for menu" + : "press for menu"; + }, true); } protected override void LoadComplete()