Bind event to activation delay change

This commit is contained in:
iiSaLMaN 2019-09-27 02:59:42 +03:00
parent 911094e790
commit 7904f77cd5

View File

@ -63,9 +63,13 @@ namespace osu.Game.Screens.Play.HUD
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuConfigManager config) private void load(OsuConfigManager config)
{ {
text.Text = config.Get<int>(OsuSetting.UIHoldActivationDelay) > 0 var activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay).GetBoundCopy();
? "hold for menu" activationDelay.BindValueChanged(v =>
: "press for menu"; {
text.Text = v.NewValue > 0
? "hold for menu"
: "press for menu";
}, true);
} }
protected override void LoadComplete() protected override void LoadComplete()