mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Assign to field and move to load complete
This commit is contained in:
parent
7904f77cd5
commit
2670a23e6f
@ -60,21 +60,23 @@ namespace osu.Game.Screens.Play.HUD
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
[Resolved]
|
||||
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 =>
|
||||
{
|
||||
text.Text = v.NewValue > 0
|
||||
? "hold for menu"
|
||||
: "press for menu";
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
text.FadeInFromZero(500, Easing.OutQuint).Delay(1500).FadeOut(500, Easing.OutQuint);
|
||||
|
||||
base.LoadComplete();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user