mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 23:27:38 +09: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;
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user