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]
private void load(OsuConfigManager config)
{
text.Text = config.Get<int>(OsuSetting.UIHoldActivationDelay) > 0
? "hold for menu"
: "press for menu";
var activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay).GetBoundCopy();
activationDelay.BindValueChanged(v =>
{
text.Text = v.NewValue > 0
? "hold for menu"
: "press for menu";
}, true);
}
protected override void LoadComplete()