Assign to field and move to load complete

This commit is contained in:
iiSaLMaN 2019-09-27 08:15:24 +03:00
parent 7904f77cd5
commit 2670a23e6f

View File

@ -60,21 +60,23 @@ namespace osu.Game.Screens.Play.HUD
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
} }
[BackgroundDependencyLoader] [Resolved]
private void load(OsuConfigManager config) private OsuConfigManager config { get; set; }
private Bindable<int> activationDelay;
protected override void LoadComplete()
{ {
var activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay).GetBoundCopy(); activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
activationDelay.BindValueChanged(v => activationDelay.BindValueChanged(v =>
{ {
text.Text = v.NewValue > 0 text.Text = v.NewValue > 0
? "hold for menu" ? "hold for menu"
: "press for menu"; : "press for menu";
}, true); }, true);
}
protected override void LoadComplete()
{
text.FadeInFromZero(500, Easing.OutQuint).Delay(1500).FadeOut(500, Easing.OutQuint); text.FadeInFromZero(500, Easing.OutQuint).Delay(1500).FadeOut(500, Easing.OutQuint);
base.LoadComplete(); base.LoadComplete();
} }